473,756 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1292
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>Nothin g as valid lease point expiration time </returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifet imeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussi ons.microsoft.c omschreef in bericht
news:43******** *************** ***********@mic rosoft.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>Nothin g as valid lease point expiration time </returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifet imeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussi ons.microsoft.c omschreef in bericht
news:43******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c omschreef in bericht
news:D5******** *************** ***********@mic rosoft.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...tha t 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>Nothin g as valid lease point expiration time
</returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifet imeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussi ons.microsoft.c omschreef in bericht
news:43******* *************** ************@mi crosoft.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***@discussi ons.microsoft.c omschreef in bericht
news:D5******** *************** ***********@mic rosoft.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>Nothin g as valid lease point expiration time
</returns>
''' <remarks>
''' </remarks>
''' <history>
''' [michel] 6/4/2005 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Overrides Function InitializeLifet imeService() As Object
Return Nothing
End Function
#End Region

hth

michel


"dange" <da***@discussi ons.microsoft.c omschreef in bericht
news:43******** *************** ***********@mic rosoft.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
3041
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 export a simple subset of data to our ISP, like customer name, order ID and status. Anyone ever do this? For example, if the status changed from REQUEST to QUOTE or from QUOTE to PRODUCTION, the AfterUpdate event of the Access application...
1
2311
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 be updated from a Microsft Access database once a week. The Micorosft Access database is running on a Windows NT 4 platform.
3
8657
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;" & _ "Data Source=remoteservername;" & _ "Initial Catalog=databasename;" & _ "User ID=mylogin" & _
6
3886
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 and the server upon return to the office. I am planning it this; Move all access tables to sql server and then link the tables to access front-end mdb app (using odbc?). Copy the same setup (access front end + sql backend) onto each laptop....
9
3313
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 >people moving from power user to developer, but now I suggest you browse >it, >too. It strongly emphasizes ADO, which knowledgeable Microsoft insiders no >longer recommend, and the Access ADP client to SQL Server. He writes well, >and is a good...
92
7670
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 to find out who it is that actually wants to get rid of it, but I can't find anyone who will admit to trying to get rid of it. Nevertheless, I'm always hearing about how their "phasing it out" or "getting rid of it". Because no-one owns up I can't...
3
3493
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 site that has this prohibition, and I have uploaded DAPs to various sites and used them from those sites. I do not understand why any site manager would prohibit DAPs. To the best of my knowledge DAPs, as HTM files, are merely hosted on the...
0
3292
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 comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
2
1692
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), and not the client. I think the best way to do this is to expose data layer objects using Remoting to the client. This sounds almost like a design pattern to me, but I can't seem to find
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10034
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.