Good day!
I wonder is in glassfish way to pass params directly into Message Driven Bean from environment. Best way from deployment descriptor.
This way does not work: (Performing lookup from JNDI from MDB, but fails in deploy time)
<enterprise-beans>
<message-driven>
...
<ejb-name>GenericControlManagerImpl</ejb-name>
<ejb-class>com.jnetx.ejb.application.GenericControlManagerImpl</ejb-class>
...
<env-entry>
<description>desc</description>
<env-entry-name>statementsPerConnection</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>20</env-entry-value>
<env-entry>
...
</message-driven>
</enterprise-beans>
DeployException:
Error loading deployment descriptors for module [mpcc-jee-generic-application] Line 33 Column 24 -- Deployment descriptor file META-INF/ejb-jar.xml in archive [mpcc-jee-generic-application]. cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry'. One of '{"
http://java.sun.com/xml/ns/j2ee":resource-ref, "
http://java.sun.com/xml/ns/j2ee":resource-env-ref, "
http://java.sun.com/xml/ns/j2ee":message-destination-ref, "
http://java.sun.com/xml/ns/j2ee":security-identity}' is expected.
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:380)
at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:423)
at com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:140)
at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:179)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry'. One of '{"
http://java.sun.com/xml/ns/j2ee":resource-ref, "
http://java.sun.com/xml/ns/j2ee":resource-env-ref, "
http://java.sun.com/xml/ns/j2ee":message-destination-ref, "
http://java.sun.com/xml/ns/j2ee":security-identity}' is expected.
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:304)
at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:226)
at com.sun.enterprise.deployment.archivist.Archivist.r
[Message sent by forum member 'theme_theme' (theme_theme)]
http://forums.java.net/jive/thread.jspa?messageID=317060