How to create a custom JNDI binding in JBoss AS7?

I am looking to create a custom JNDI binding in JBoss AS7, but cannot figure out how to configure it. I looked at the standalone-preview.xml file, but I donโ€™t see any examples that would allow me to understand how to configure JNDI search with a simple string (URL) as the return value. I tried to view the documents, but I donโ€™t see anything there.

I found the following snippet on the Jboss Forums , but I donโ€™t understand how to use it at all. I can not find the documentation for object-factory - how to determine the factory object and / or even what it is and how it works (that is: which attributes should be set, what they mean, etc.):

 <subsystem xmlns="urn:jboss:domain:naming:1.1"> <bindings> <object-factory name="java:/custom/dog" module="org.jboss.animalshelter" class="org.jboss.animalshelter.resource.DogFactory"/> </bindings> </subsystem> 

I know how this was done in JBoss AS6, but I cannot figure out how to do this for AS7.

Can someone point me in the right direction?

Thanks,

Eric

+4
source share
1 answer

I believe that ObjectFactory . You can find information in Writing a Factory Object .

0
source

Source: https://habr.com/ru/post/1394292/


All Articles