Thanks Jon. your answer is very promising, still I think it would be helpful if you can post a simple EJB2.x example.
Avi Jonathan Gallimore-2 wrote: > > Hi Avi, > > I don't think we have a good example of showing EJB 2.1, but I could make > a > 2.1 version of our simple-stateless example if that would be helpful. > > I have run some EJB 2.1 projects on OpenEJB 3 at work not too long ago (we > migrated to EJB 3 for all our projects about 3-4 months ago), so > everything > should work with EJB 2.1 - I'm not aware of any problems. Deployment works > in the same way for both EJB 2.1 and EJB 3 applications. > > In terms of your client code, looking up an EJB 2.1 bean, you'll need to > lookup the home interface, use PortableRemoteObject.narrow to cast it, and > call the create() method on the home interface. > > With EJB 3, you can still use the home interface if you like, or if you > prefer, you can just lookup the business interface of your bean. > > Hope that helps. > > Jon > > PS. If you're interested in migrating your app to EJB 3, our Eclipse > plugin > (http://openejb.apache.org/openejb-eclipse-plugin.html) has a wizard which > might help with this. > > > > On Sun, Aug 2, 2009 at 4:53 PM, Avi Grossbard > <[email protected]>wrote: > >> >> I find in the OpenEjb homepage the following: >> "Supports EJB 3.0, 2.1, 2.0, 1.1 in all modes; embedded, standalone or >> otherwise" >> >> However I didn't find any example (both client code & remote EJB) that >> demonstrates this. >> 1. is there code examples that shows how a client of openejb 3.1 can use >> remote EJB2.x? >> 2. Can client code can be coded in a uniform & consistent manner >> regardless >> the version of the remote EJB? >> 3. If the answer to 2 is affirmative, could you possibly provide/point to >> a >> code example that demonstrate it? >> >> Thanks, >> Avi >> -- >> View this message in context: >> http://www.nabble.com/openejb3.x-client-with-remote-components-written-in-pre-EJB3-era-tp24779108p24779108.html >> Sent from the OpenEJB User mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/openejb3.x-client-with-remote-components-written-in-pre-EJB3-era-tp24779108p24823239.html Sent from the OpenEJB User mailing list archive at Nabble.com.
