0 Replies Latest reply on Jan 8, 2015 9:10 AM by Kishor V

    Jboss AS 7 binding jboss-beans.xml beans to JNDI

    Kishor V Newbie


      I am working on Jboss AS 5.1 migration to Jboss 7. In Jboss 5, We have few pojo beans initialized in *-jboss-beans.xml, bounded to JNDI as below

      <deployment xmlns="urn:jboss:bean-deployer:2.0">

      <bean name="myConnFactory" class="com.MyConnectionFactoryImpl" >

             <annotation>@org.jboss.aop.microcontainer.aspects.jndi.JndiBinding(name="MyConnFactory", aliases={"CONN/MYCONN"})</annotation>


                  <parameter><inject bean="..." /></parameter>




      . Application will make use of these beans through JNDI lookup. Essentially,there are few connection factories.

      In Jboss AS 7, POJO deployer schema is changed and there is no more annotation support in the new namespace (<deployment xmlns="urn:jboss:pojo:7.0">).

      per: https://github.com/openshift-cartridges/openshift-wildfly-cartridge/blob/master/versions/8/docs/schema/jboss-pojo_7_0.xsd

      Somehow, i managed to deploy above jboss-beans.xml into Jboss AS 7. But, i could not able to bind the bean ref to JNDI.


      Can anyone provide me solution to bind  "myConnFactory" bean to "CONN/MYCONN" JNDI object.