[jboss-user] [EJB 3.0] - Re: Remote EJB call problem

jaikiran do-not-reply at jboss.com
Mon Jun 1 03:37:13 EDT 2009


When you use remote calls, the parameters and return types are serialized/deserialized. So your call to the persist method on the bean from the client cannot expect the "country" parameter to be passed by reference.

Change this in client:

countryRemote.persist(country);
  | countryRemote.flush();
  | return country.getId();

to

Country persistedCountry = countryRemote.persist(country);
  | countryRemote.flush();
  | return persistedCountry.getId();

i.e. work on the returned object.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234377#4234377

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234377



More information about the jboss-user mailing list