Environment entry (<env-entry>) is not available under java:comp/env
willreichert Dec 7, 2011 2:48 PMWe are testing the latests 7.1.0.b1 "Tesla" release of jboss-as and are running into a startup issue when deploying part of the enterprise spec application. The application has an <env-entry> that defines an Integer in web.xml
<env-entry>
<description>This env entry is to set the core thread pool size of the delivery scheduler</description>
<env-entry-name>supplier.deliveryhandler.poolsize</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>10</env-entry-value>
</env-entry>
The application initializes a private static variable by calling ic.lookup("java:comp/env/supplier.deliveryhandler.poolsize")).intValue();
The result is the following exception.
13:46:00,803 ERROR [stderr] (MSC service thread 1-1) javax.naming.NameNotFoundException: java:comp/env/supplier.deliveryhandler.poolsize
13:46:00,804 ERROR [stderr] (MSC service thread 1-1) at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:90)
13:46:00,804 ERROR [stderr] (MSC service thread 1-1) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)
13:46:00,804 ERROR [stderr] (MSC service thread 1-1) at javax.naming.InitialContext.lookup(InitialContext.java:411)
The JBoss Management : JNDI Bindings screen shows the following:
java:
TransactionManager TransactionManagerDelegate@7041b32e
java:jboss
TransactionManager TransactionManagerDelegate@7041b32e
TransactionSynchronizationRegistry TransactionSynchronizationRegistryImple@7dc377b2
UserTransaction Transaction: unknown
jaas:
jboss-ejb-policy JBossCachedAuthenticationManager@5ac0628d
other JBossCachedAuthenticationManager@c864587
jboss-web-policy JBossCachedAuthenticationManager@433ea87d
Default Session@1f76f752
datasources
ExampleDS WrapperDataSource@17cfb961
applications
emulator.ear
java:app
AppName emulator
Thanks for any guidance you may be able to provide so that we can start running the spec application once 7.1 is ready.