Forums Register Login

Best way to inject a Container Managed bean into a Java Class

+Pie Number of slices to send: Send
So I have a project that I am working on and was wondering how to inject a container managed bean into a java class.....some things I have looked at is JNDI lookup using context which is pretty straight forward but what are the alternatives? Is JNDI Lookup the preferred way? I tried @Inject but I couldn't get it to work, seems like it only works for classes maintained by the container.....




This is the CategoryFacade Bean

My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 519 times.
Similar Threads
MZs Notes - Pg 159
Can't reach NamedQuery
DOA as session bean ?
JPA2.0 CascadeType.ALL doesn't cascade persist
using EJB3.1 with Spring 3.1
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:46:07.