Hi, The second point you brought up was an interesting one, if had to use the ORB implementation that comes with the JDK, what are the code changes that i would do in the client and server code accessing this remote object ?
Thanks Laks -----Original Message----- From: J Mark Birenbaum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 12:12 PM To: [EMAIL PROTECTED] Subject: Re: passing an object to an stateless EJB from a richclient Calls to EJBs pass everything by value, not reference (I'm not really sure what it means to have "disabled pass by value", since to truly pass by reference requires explicit coding). So modifying the object on the server side, will not modify the object on the client. There are two possible solutions. The first is to make the object you pass a remotable object. This is fairly easy if you are happy with using just plain RMI (see java.rmi.server.RemoteObject). It gets a little more complex if you want it to work with any corba implementation (see javax.rmi.PortableRemoteObject) The second, is simply to return the new object state as the return value of your method, and then set the local object with that state. Generally, this is my preferred solution, as it's less complex, and usually less network intensive. It also avoids all sorts of race conditions caused by having multiple Stateless Session beans trying to access the same remote object. Sorry if I'm stating the obvious, but that's always the best place to start <GRIN> ----- Original Message ----- From: "Sankaran, Rajesh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 9:53 AM Subject: passing an object to an stateless EJB from a richclient > Hi, > > We are trying to call a method in a stateless EJB from a rich client, and an > object is passed as argument to this method. This stateless EJB is deployed > in iAS 6.0 and both rich client and the App server runs under Solaris 2.6. > > Though there is no problem in invoking the ejb method, and the method can > access the object's data, the updated object inside the method is not > showing up the changed value to the calling rich client application. > > The EJB is deployed with both RMI-IIOP enabled option and disabled with pass > by value option. > > Could any one help us by throwing some light on this? > > Thanks. > Rajesh > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff EJB-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".