-
1. Re: Cannot find environment parameter
adrian.brock Jul 23, 2003 3:25 PM (in response to shaun)Post the full thing,
your post shows
then -
2. Re: Cannot find environment parameter
shaun Jul 24, 2003 3:42 AM (in response to shaun)Here's the whole thing
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<ejb-name>Lesson</ejb-name>
jlids.lesson.LessonHome
jlids.lesson.Lesson
<local-home>jlids.lesson.LessonLocalHome</local-home>
jlids.lesson.LessonLocal
<ejb-class>jlids.lesson.LessonBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>jlids.lesson.LessonPK</prim-key-class>
False
<resource-ref>
<res-ref-name>jdbc/MySqlDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<ejb-name>jlidState</ejb-name>
jlids.jlidSession.jlidStateHome
jlids.jlidSession.jlidState
<ejb-class>jlids.jlidSession.jlidStateBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<!--This element is an environment variable only available in jlidState-->
<env-entry>
This element is an environment variable representing the start ID of the JLID entry. For example if the startJLID is 50000 then only JLIDS above 50000 should be displayed.
<!--The JNDI location for the environment variable is java:comp/env/startJLID-->
<env-entry-name>startJLID</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>50000</env-entry-value>
</env-entry>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>Lesson</ejb-name>
<method-intf>Local</method-intf>
<method-name>*</method-name>
<ejb-name>Lesson</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Shaun -
3. Re: Cannot find environment parameter
radl01 Jul 24, 2003 6:42 AM (in response to shaun)Hi,
try to look at JNDIView (jmx-console) where the env var. is registered.
Jan -
4. Re: Cannot find environment parameter
shaun Jul 24, 2003 8:04 AM (in response to shaun)It confirms it's not there.
-
5. Re: Cannot find environment parameter
shaun Jul 24, 2003 10:44 AM (in response to shaun)The error was in the code!
String startJLID = (String) initCtx.lookup("java:/comp/env/startJLID");
String startJLID = (String) initCtx.lookup("java:comp/env/startJLID");
Schoolboy error on my part!