I am using Jboss and ejb's for my persistent layer and following the Tapestry Virtual Library example. In hivemodule.xml the following contribution is used:

 <contribution configuration-id="tapestry.state.ApplicationObjects">
   <!-- Talk to the local JBoss JNDI -->
<default symbol="java.naming.factory.initial" value="org.jnp.interfaces.NamingContextFactory"/> <default symbol="java.naming.factory.url.pkgs" value="org.jboss.naming:org.jnp.interfaces"/>
   <default symbol="java.naming.provider.url" value="localhost:1099"/>
 </contribution>

In the past I would also add my own application objects here like:

 <contribution configuration-id="tapestry.state.ApplicationObjects">
   <!-- some object -->
   <state-object name="some-name" scope="session">
     <create-instance class="somepath.SomeName"/>
   </state-object>
 </contribution>

Now if I combine the two like this:

 <contribution configuration-id="tapestry.state.ApplicationObjects">
   <!-- Talk to the local JBoss JNDI -->
<default symbol="java.naming.factory.initial" value="org.jnp.interfaces.NamingContextFactory"/> <default symbol="java.naming.factory.url.pkgs" value="org.jboss.naming:org.jnp.interfaces"/>
   <default symbol="java.naming.provider.url" value="localhost:1099"/>
   <!-- some object -->
   <state-object name="some-name" scope="session">
     <create-instance class="somepath.SomeName"/>
   </state-object>
 </contribution>

When the some-name is injected into a page and created for the first time an org.apache.hivemind.ApplicationRuntimeException is thrown highlighting the first:

<default symbol="java.naming.factory.initial" value="org.jnp.interfaces.NamingContextFactory"/>

line and states:

Error at context:/WEB-INF/hivemodule.xml, line 61, column 100: Element default is not allowed here.

If I use either separately everyting is fine. How can I define both the JBoss JNDI and other application state objects?

Thanks inadvance,

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to