Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

j2ee-1.4 web module and jee5 ejb module??  RSS feed

 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
How do I call a ejb 3.0 from a class that belong to a j2ee-1.4 module?
Thanks in advance,
Julien.

P.S. I use Jboss 4.0.5
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same was as any client would lookup a Java EE 5 EJB. Get an InitialContext, lookup the Bean, cast it to its interface, and start using it.

It doesn't matter that the client also happens to be a J2EE 1.4 object.

Mark
 
Julien Martin
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But my bean does not have a home interface...
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To enable backward compatibility, your bean needs to be adapted to EJB 2.x client views, and in particular to provide a home interface, by a @RemoteHome annotation for example.
[ March 28, 2007: Message edited by: Edvins Reisons ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!