Is Entity Bean not supported in J2EE specification? - jpa

I am reading J2EE6 tutorial Jakarta EE as it is called now. In that it says that there are 2 types of enterprise beans one is session bean and second is message driven bean. There is no mention of Entity Bean (BMP & CMP). I guess now Entity Bean is not part of EJB components, while for entity bean Java class annotated with JPA #Entity should be used?

Don't panic!
JPA is still here: https://eclipse-ee4j.github.io/jakartaee-tutorial/#persistence
P. S. TOC of Jakarta EE 9 tutorial: https://eclipse-ee4j.github.io/jakartaee-tutorial/

Related

EJB stateless beans are not injected properly after migration to JBOSS 7.4 and Java11

Recently we migrated our application from Jboss 6 to JBoss 7.4 version.
I have a XXXFilter which implements javax.servlet.Filter. XXXFilter uses #Inject annotation to inject some EJB stateless beans. But the problem is the beans are not getting injected into XXXFilter. It's working fine in jboss 6 and jdk8 but NOT working after we migrated to jboss7.4 and jdk11.
Any ideas?
You need to use the #EJB annotation.

Hibernate Code Checker

Does anyone know of a plugin or tool that would check for validity of Hibernate usage in Java classes?
For example, warn when an entity is missing a no-arg constructor? The Eclipse IDE has a Hibernate tool, but it's mostly about generating the config files.
You have Eclipse Dali persistence tool, but it check for JPA valid usage (like, valid relation, entities referenced in persistence.xml, with a primary key, and against the database, ...). It probably has what you want (checking no arg constructor).
The plugin name (if you search in Updates) : Dali Java Persistence Tools - JPA Support

Jboss as7 ejb injection inside cdi beans

I have developed an ear application using ejb3.1, jsf2.0 and cdi enabled.
I have packaged my application as ear with ejb modules defining the session beans, ejbremote jar defining the remote session interfaces and the jpa entities, and the war application which includes dependency on ejbremote jar (for the remote interface lookup, and the jpa entities).
Scenario:
If i inject directly session beans defined in the ejb jar in any cdi bean, jboss fails to find the righ proxy to inject, and throws a ClassCastException EjbManagerRemote field of my cdi bean cannot be cast to com.sun.proxy.$Proxy78
However, with glassfish, this scenario works perfectly.
To circumvent the jboss problem, i have developed a session bean inside the war (something like a producer: actually intend to do this) file where i inject the session beans and then inject this local session bean into the cdi beans which give me the reference to the session beans.
My question is, why does jboss fail to inject the remote session beans, yet glassfish has no problem?
What am i missing in ejb and cdi bean injection?
Note: am injecting the beans using #EJB annotation.
Thanks

Equinox OSGi + JPA Eclipselink + PAX JDBC driver adapter

After many problems with "CLASS NOT FOUND" problems in OSGi working with JPA persistence & Eclipse link, I found some article introducing PAX JDBC driver adapter.
Does anybody has some experience with this ?
Pax JDBC should be fairly straightforward to use. Just check out the docs.
In combination with Eclipselink, you should probably stay clear of the Eclipselink OSGi adapter which has an unnecessary dependency on Eclipse Gemini DBAccess, at least last time I looked at it.
Pax JPA is an incubating project which provides OSGi Enterprise compliant adapters for Eclipselink and OpenJPA.

Migrate from EJB 2 Entity Bean to EJB3

I am having some entity beans created in EJB 2.0 and now I need to migrate to EJB 3.x, but I've studied that use of entity beans are changed in EJB 3.x and they are using JPA instead.
Where can I find solution to actuate my beans to be comfortable with EJB 3.x?
For example from following resources available online:
http://www.datadisk.co.uk/html_docs/ejb/ejb3_migration.htm
http://www.oracle.com/technetwork/middleware/ias/oc4j-twp-ejb3-migration-1013-133021.pdf
or following printed books:
Pro JPA 2 Mastering the Java Persistence API (p. 457-466)
EJB3 in Action (p. 513-528)
IntelliJ EJB refactoring tools might prove to be useful: http://www.jetbrains.com/idea/webhelp/migrating-to-ejb-3-0.html
I belive there are some for Eclipse too.
just for future reference, I recommend the following link:
http://what-when-how.com/enterprise-javabeans-3/migrating-cmp-2-entity-beans-to-the-ejb-3-jpa-part-1/
And there's also part 2 on the same site as well as migrating session beans and MDBs.
I used them and found them very helpful and useful.