Forums Register Login

Referencing session beans from helper classes / JNDI

+Pie Number of slices to send: Send
Hi fellow ranchers. I don't seem to get the example in the EJB3 In Action on pages 442-443. The example is about "Referencing session beans from Helper classes". The book suggests following situation: ActionBazaarBidControllerServlet calls unmanaged BidProcessor, which in turns uses session bean PlaceBid. In the example ActionBazaarBidControllerServlet is annotated with @EJB at the class level and PlaceBid is searched in BidProcessor using context.lookup. I assume this is JNDI lookup (not SessionContext). But I'm puzzled; can't I anyhow lookup the JNDI resource myself on the BidProcessor-class without annotating the "entry-point" ActionBazaarBidControllerServlet? Or does that annotation somehow "enable" EJB-specific JNDI-lookups?

Thanks for answers in advance
Don't play dumb with me! But you can try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 705 times.
Similar Threads
How to invoke an EJB3 from a simple client
can EJB 2.1 call EJB 3.0 ?
EJB application deployment problem
Jboss and Ejb 2.1 ejb-ref lookup
Doubt on DI
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:11:40.