0 Replies Latest reply on Jun 18, 2012 3:02 PM by gibran antonio

    JNDI binding from JBOSS 6 to JBOSS 7.1

    gibran antonio Newbie

      Hello! In Jboss 6.0, I have a -service.xml file with a JNDIbinding which goes like this:




          <mbean code="org.jboss.naming.JNDIBindingServiceMgr" name="pm-urls:service=JNDIBindingServiceMgr"> 

              <attribute name="BindingsConfig" serialDataType="jbxb"> 

                  <jndi:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema-instance


                      xs:schemaLocation="urn:jboss:jndi-binding-service:1.0 resource:jndi-binding-service_1_0.xsd"> 


                      <jndi:binding name="java:/jndiTest"> 

                          <java:properties xmlns:java="urn:jboss:java-properties" 


                              xs:schemaLocation="urn:jboss:java-properties resource:java-properties_1_0.xsd"> 

















      Then, in the application I would do:





                  InitialContext ctx = new InitialContext(); 

                  Properties prop = (Properties) ctx.lookup("java:/jndiTest"); 






      So, now I'm migrating to Jboss 7.1. Any idea on how to adapt this ? I know that in the standalone.xml there is this line: <subsystem xmlns="urn:jboss:domain:naming:1.1"> , but I didn't found how to bind a key and a value like I did in -service.xml in JBOSS 6.