...
"EJB Core Contracts and Requirements" specification section 16.2.2"
- "A ï¬eld ï¬?eld or method of a bean class may be annotated to request that an entry from the bean's environment
be injected. Any of the types of resources or other environment entries described in this chapter may
be injected. Injection may also be requested using entries in the deployment descriptor corresponding to
each of these resource types."
...
$ cd <openejb3_project_dir>/examples/resource-injection
$ mvn clean installtest
No Format |
---|
------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.openejb.examples.injection.InvoiceBeanTest WARN - Unable use logging config as there are 3 file references containing directories which have not been created. See the list below. WARN - [0] /home/raj/projects/openejb3/examples/resource-injection/conf/logs/transaction.log WARN - [1] /home/raj/projects/openejb3/examples/resource-injection/conf/logs/openejb.log WARN - [2] /home/raj/projects/openejb3/examples/resource-injection/conf/logs/server.log Apache OpenEJB 3.0-incubating-SNAPSHOT build: 20070120-10:45 http://incubator.apache.org/openejb INFO - openejb.home = /home/raj/projects/openejb3/examples/resource-injection INFO - openejb.base = /home/raj/projects/openejb3/examples/resource-injection WARN - Cannot find the configuration file [conf/openejb.xml]. Will attempt to create one for the beans deployed. INFO - Found EjbModule in classpath: /home/raj/projects/openejb3/examples/resource-injection/target/classes WARN - Cannot find the META-INF/openejb-jar.xml in /home/raj/projects/openejb3/examples/resource-injection/target/classes. WARN - Auto-creating a container for bean InvoiceBean: Container(type=STATEFUL, id=Default Stateful Container) WARN - Auto-deploying ejb InvoiceBean: EjbDeployment(deployment-id=InvoiceBean, container-id=Default Stateful Container) WARN - Auto-deploying ejb PurchaseOrderBean: EjbDeployment(deployment-id=PurchaseOrderBean, container-id=Default Stateful Container) INFO - Loaded Module: /home/raj/projects/openejb3/examples/resource-injection/target/classes INFO - OpenEJB ready. OpenEJB ready. Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.571 sec Running org.apache.openejb.examples.injection.PurchaseOrderBeanTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.037 sec Results : Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar] [INFO] Building jar: /home/raj/projects/openejb3/examples/resource-injection/target/resource-injection-1.0-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing /home/raj/projects/openejb3/examples/resource-injection/target/resource-injection-1.0-SNAPSHOT.jar to ... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16 seconds |