[jboss-user] [EJB 3.0] - Re: env-entry injection in a @Service EJB
wolfc
do-not-reply at jboss.com
Thu Jul 20 13:07:04 EDT 2006
Please try the following:
<?xml version="1.0"?>
|
| <ejb-jar
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
| http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
| version="3.0">
| <display-name>EnvEntry Tests</display-name>
| <enterprise-beans>
| <session>
| <ejb-name>TestEnvEntry</ejb-name>
| <env-entry>
| <env-entry-name>maxExceptions</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>15</env-entry-value>
| </env-entry>
| <env-entry>
| <env-entry-name>minExceptions</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>5</env-entry-value>
| <injection-target>
| <injection-target-class>org.jboss.ejb3.test.enventry.TestEnvEntryBean</injection-target-class>
| <injection-target-name>minExceptions</injection-target-name>
| </injection-target>
| </env-entry>
| <env-entry>
| <env-entry-name>org.jboss.ejb3.test.enventry.TestEnvEntryBean/numExceptions</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>10</env-entry-value>
| </env-entry>
| </session>
| </enterprise-beans>
| </ejb-jar>
|
With the first one you need:
@Resource(name="maxExceptions") private int maxExceptions;
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959639#3959639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959639
More information about the jboss-user
mailing list