|
|
|
|||||
|
passing objects
I am new to ICE and have a question.
i am currently returning an object (not a proxy) from a java server to a c#client. On the client side, i want the methods and members of the object I just retrieved to be called locally to the client (non-rmi). So i did this with this slice code: class JMSQueueIce { string queuename; string getName() throws Util::JMSExceptionIce; void setName( string name ) throws Util::JMSExceptionIce; }; .... JMSQueueIce lookup( string destinationName) throws Util::JMSExceptionIce; I had my generated abstract class, extended it in on both sides (c# for client, java for server), and registered them with object factories. The problem is that on the server side, i want to associate another object (a non-ice, java jms queue object) with the one i'm returning to the client - in other words, i want to store it on the server-side only. So my question first is: 1. how do you recommend I do this? 2. If your answer is "pass a proxy to this queue object back and forth" in order to facilliate the server-side storage, then how do i ensure that the getName() and setName() methods will be invoked locally when called from the client, instead of remotely? (i.e. i want that variable queuename to be sent across the wire as well) |
|
||||||
|
You may find this post of interest.
Quote:
Another way to (conceptully) pass a reference to Java (non-Ice) object is to have the server create the object and put it into a table. The server then passes the table index to the client, and the client can return the index to the server to indicate which object it is referring to. The first option (using a proper Ice object and invoking on its proxy) is preferable, unless you really have no choice but to use option 2. Cheers, Michi. |
|
|||||
|
The reason I am returning a proxy from the server to the client
(JMSQueueIce* lookup( string destinationName) ...) instead of just a regular class is to be able to associate a non-ice object with the ice object JMSQueueIceObject on the server to save the non-ice object (saving state). Is there a better way to enable this sort of caching? Thanks! |
|
|||||
|
How would I implement the table suggestion?
I was reading the former post you recommended, and have these questions: - How do you denote an address space for a Prx? Isn't is always remote? Or can you have some methods in the Prx (such as getName() ) be local and others be remote? |
|
||||||
|
Quote:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem passing context map with createSession() | bartley | Help Center | 6 | 02-02-2006 11:39 PM |
| Passing parameters to constructor | jacopo | Help Center | 2 | 05-12-2005 01:47 PM |
| passing a context to a locator | robert | Help Center | 4 | 10-23-2004 12:26 PM |
| Passing Java Objects using Slice | brian | Help Center | 10 | 05-03-2004 06:42 PM |