473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access to remote object from server

Hi

I want to access a remote object to raise an event. How do I get the
reference to the object from the server application?
I tried to use a singleton but this does not work.

thanks
Dan

Aug 11 '08 #1
4 1276
I tried to use a singleton but this does not work.

Guessing...that you know how remoting works ?

You should use a singleton with a lease timeout set to infinite otherwise ,
it will still create new instances

copy and paste this region in your singleton
#Region " Remoting Override "
''' -----------------------------------------------------------------------------
''' <summary>
''' this method will make sure that the leasetime will be infinite
''' </summary>
''' <returns>Nothing as valid lease point expiration time </returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:43**********************************@microsof t.com...
Hi

I want to access a remote object to raise an event. How do I get the
reference to the object from the server application?
I tried to use a singleton but this does not work.

thanks
Dan

Aug 11 '08 #2
Hi Michel

As this is my first project with remoting I started with downloading an
example that shows the basic event usage with a chat application. This
example already contains your code region.
Raising the event from within the remote object works fine, but from another
server class is not working

Dan

"Michel Posseth [MCP]" wrote:
I tried to use a singleton but this does not work.

Guessing...that you know how remoting works ?

You should use a singleton with a lease timeout set to infinite otherwise ,
it will still create new instances

copy and paste this region in your singleton
#Region " Remoting Override "
''' -----------------------------------------------------------------------------
''' <summary>
''' this method will make sure that the leasetime will be infinite
''' </summary>
''' <returns>Nothing as valid lease point expiration time </returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:43**********************************@microsof t.com...
Hi

I want to access a remote object to raise an event. How do I get the
reference to the object from the server application?
I tried to use a singleton but this does not work.

thanks
Dan


Aug 11 '08 #3
Well in that case it should be pretty simple
you can just create a sub in your interface and thus raise the event from
the sub from anny client atached to the singleton

hth

Michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:D5**********************************@microsof t.com...
Hi Michel

As this is my first project with remoting I started with downloading an
example that shows the basic event usage with a chat application. This
example already contains your code region.
Raising the event from within the remote object works fine, but from
another
server class is not working

Dan

"Michel Posseth [MCP]" wrote:
I tried to use a singleton but this does not work.

Guessing...that you know how remoting works ?

You should use a singleton with a lease timeout set to infinite
otherwise ,
it will still create new instances

copy and paste this region in your singleton
#Region " Remoting Override "
''' -----------------------------------------------------------------------------
''' <summary>
''' this method will make sure that the leasetime will be
infinite
''' </summary>
''' <returns>Nothing as valid lease point expiration time
</returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:43**********************************@microso ft.com...
Hi

I want to access a remote object to raise an event. How do I get the
reference to the object from the server application?
I tried to use a singleton but this does not work.

thanks
Dan



Aug 12 '08 #4
This works for the client, but from the server I get still another instance
of the remote object, even if the remote object was already used (created) by
the client.

Dan
"Michel Posseth [MCP]" wrote:
Well in that case it should be pretty simple
you can just create a sub in your interface and thus raise the event from
the sub from anny client atached to the singleton

hth

Michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:D5**********************************@microsof t.com...
Hi Michel

As this is my first project with remoting I started with downloading an
example that shows the basic event usage with a chat application. This
example already contains your code region.
Raising the event from within the remote object works fine, but from
another
server class is not working

Dan

"Michel Posseth [MCP]" wrote:
I tried to use a singleton but this does not work.

Guessing...that you know how remoting works ?

You should use a singleton with a lease timeout set to infinite
otherwise ,
it will still create new instances

copy and paste this region in your singleton
#Region " Remoting Override "
''' -----------------------------------------------------------------------------
''' <summary>
''' this method will make sure that the leasetime will be
infinite
''' </summary>
''' <returns>Nothing as valid lease point expiration time
</returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussions.microsoft.comschreef in bericht
news:43**********************************@microsof t.com...
Hi

I want to access a remote object to raise an event. How do I get the
reference to the object from the server application?
I tried to use a singleton but this does not work.

thanks
Dan



Aug 12 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Danny J. Lesandrini | last post by:
Our orders database exists inside our firewall but we have a web site hosted on an ISP server. If we wanted to give users the ability to query the status of their order in real time, we could just...
1
by: Mike_red | last post by:
Hello, I hope someone can solve my problem here. I am currently working/programming a website using Debian Linux + Perl + PHP + PostgreSQL + Apache. Some data in the postgreSQL server must...
3
by: cougar | last post by:
Hi, I have tried the following connection string to access a remote SQL Server: oConn.Open "Provider=MS Remote;" & _ "Remote Server=http://remoteservername;" & _ "Remote Provider=SQLOLEDB;" &...
6
by: John | last post by:
Hi We have an access app (front-end+backend) running on the company network. I am trying to setup replication for laptop users who go into field and need the data synched between their laptops...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
92
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
2
by: | last post by:
Dear Groups, I am trying to develop a simple client <-> server application where (for database security reasons) the server only has access to the centralised database (and a file repository),...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.