-
1. Re: Using Local and LocalHome Interfaces
websel Nov 14, 2003 3:28 PM (in response to tdsdev)Hi!
The trick is that the JNDI name is changed for your local access.
If you have a working version of a remote bean, change the following in your client (which of course should run in the same VM ans your entity beans)
Old: Object objref = ctx.lookup("ejb/HelloWorldBean");
New: Object objref = ctx.lookup("HelloWorldLocal");
Then change the the init of the classes as following:
Old: HelloWorld helloWorld=null;
New: HelloWorldLocalHome helloWorld=null;
Old: (HelloWorldHome)PortableRemoteObject.narrow(objref, JMSRoutingHome.class);
New: (HelloWorldLocalHome)PortableRemoteObject.narrow(objref, HelloWorldLocalHome.class);
Etc. you get the idea don't forget to instruct Xdoclet to generate the localhome and local interfaces.
Wessel -
2. Re: Using Local and LocalHome Interfaces
martin_kersten Nov 22, 2003 7:18 AM (in response to tdsdev)You dont need to use narrow on local homes.