-
1. Re: javax.ejb.Inject
mistamoasn Oct 3, 2005 10:04 AM (in response to mfornarisc)if you want to inject the entitymanager use:
@PersistenceContext (name="yourDS")
private EntityManager em;
inject is no longer available... -
-
3. Re: javax.ejb.Inject
mihai_lihatchi Oct 24, 2005 2:52 PM (in response to mfornarisc)
> I have the same problem. The thing is that I do not understand what should I do .. define a new datasource for the Entity Manager ?
> The trailblazer does not make any further reference to the persistence API ... I should create a -ds.xml file and a database for it myself ?
> I will try but the demo than looses it's purpose to explain you how to get started since you have to use another editor to make the authors-ds.xml file.
> Thank you -
4. Re: javax.ejb.Inject
mihai_lihatchi Oct 24, 2005 2:55 PM (in response to mfornarisc)I have another issue . I have developed everything deployed it.
I have discovered that there is no way I can load the SessionBean Authors in the servlet.
ClassNotFoundError.
What have I done wrong ?
The @Inject is to blame ?(Replaced it with PersistenceContext as advised) -
5. Re: javax.ejb.Inject
mihai_lihatchi Oct 27, 2005 8:00 AM (in response to mfornarisc)Fixed it .. it was a packaging error of the ejb3 bean . I tried to play around with packages ... my fault.
I should mention that I jumped to EJB3 without any prior EJB2 knowledge because it seams a lot simpler (no service locators) .
Hope that Sun certifies EJB3 soon .