BestPractices
BestPractices

Reputation: 12876

Does Java 7 SE have support for EJB?

If I want EJB 3.0 support and want to run Java 7, do I need Java EE or can I stick with SE?

In the past (many JDK versions ago), one needed the "J2EE" version of the JDK to run EJB. It would appear this is no longer true. Please advise.

UPDATE: I should have mentioned that the application will be running inside Oracle WebLogic 10.3.6.

Upvotes: 7

Views: 2784

Answers (5)

Nathan Hughes
Nathan Hughes

Reputation: 96385

EJB is part of Java EE. But if what you want is JPA, even though the API is included within Java EE (here's the API documentation) you don't need a Java EE application server for JPA anymore (unlike the situation with EJB entity beans). JPA can be used with Java SE.

If you're running this in Weblogic then you have access to Java EE, so I don't get the point of the question.

Upvotes: 5

kosa
kosa

Reputation: 66637

I think you are wrong. EJB is still part of Java EE specification only, not Java SE. If you look at Java SE API, there is no reference to EJB.

Upvotes: 1

jtahlborn
jtahlborn

Reputation: 53684

No, this is unchanged. EJBs are part of Java EE, not Java SE. This will probably never change as the infrastructure support for EJB is huge (and will not likely be included in Java SE).

Upvotes: 5

Piotr Nowicki
Piotr Nowicki

Reputation: 18174

You can use EJBs in non Java EE application server with EJB's 3.1 Lite container - http://docs.oracle.com/javaee/6/api/javax/ejb/embeddable/EJBContainer.html.
All Java EE 6 compliant application servers must be able to run in embedded mode.

This, however, is not a Java SE 7 feature (it worked fine in Java SE 6) but Java EE 6 API, so if you're stick with EJB 3.0 than you'd need to use application server or some implementor-specific features.

Upvotes: 1

Jordan Denison
Jordan Denison

Reputation: 2727

In order to run EJB, you need an EJB container (such as Glassfish), which is not included with Java SE 7.

Upvotes: 1

Related Questions