Title: Spring {note} This document and the related feature is considered a prototype and will change based on user feedback. All comments suggestions welcome. {note} # Introduction The OpenEJB Spring integration makes all Spring defined beans injectable to JEE components, and all JEE components can be injected to Spring beans. The injection system supports arbitrarily complex nesting (e.g., Spring bean injected into a JEE component, which is then injected into another Spring bean), including: * @Resouce injection of any Spring bean into EJB * Injection of any JEE resource into a Spring bean, including: ** EJB 3.0 beans ** EJB 3.1 Singleton Bean ** JDBC Connector ** JMS Connector ** JMS Queue and Topic ** Generic JEE Connector (JCA) In addition, the OpenEJB Spring integration add support for discovery and deployment of standard JEE packages within a Spring context, including: * EAR * EJB Jar * Persistence Unit * RAR *Requirements:* * OpenEJB 3.1+ * Spring X.X * Java 1.5 or 1.6 # Spring Beans The following beans are usable in any spring xml file.
Class | Description |
---|---|
org.apache.openejb.spring.ClassPathApplication | Scrapes the classpath for all EJB, RAR, and Persistence applications, deploys them, and imports them into the current ApplicationContext. All applications found are treated as one big EAR unless the _classpathAsEar_ property is set to _false_ |
org.apache.openejb.spring.Application | Scrapes an individual jar file for EJB, RAR, and Persistence applications, deploys them, and imports them into the current ApplicationContext. The 'jarFile' property is required. The application is treated as it's own self-contained EAR, separate from other uses of 'Application' |
org.apache.openejb.spring.Resource | Allows an OpenEJB |
org.apache.openejb.spring.OpenEJBResource | A FactoryBean that imports a Resource from OpenEJB into the Spring ApplicationContext. Has the following properties: _type_ such as javax.sql.DataSource, and _resourceId_. In the future this bean will not be required and all OpenEJB Resources will automatically be imported into the Spring ApplicationContext |
org.apache.openejb.spring.BmpContainer | Allows an OpenEJB BMP
|
org.apache.openejb.spring.CmpContainer | Allows an OpenEJB CMP
|
org.apache.openejb.spring.SingletonContainer | Allows an OpenEJB
Singleton |
org.apache.openejb.spring.StatefulContainer | Allows an OpenEJB Stateful
|
org.apache.openejb.spring.StatelessContainer | Allows an OpenEJB Stateful
|
org.apache.openejb.spring.MdbContainer | Allows an OpenEJB Message-Driven
|
org.apache.openejb.spring.EJB | A FactoryBean that imports an EJB from OpenEJB into the Spring ApplicationContext. One of these is automatically created for each interface of each EJB, but explicit use can be nice if you desire to import an EJB with a specific name. Has the following properties: _deploymentId_, _interface_ |