title: How to create a custom string JNDI binding in JBoss AS7?
body: <p>I'm looking to create a custom string JNDI binding in JBoss AS7, but can't quite figure out how to configure it.  I looked in the standalone-preview.xml file, but do not see any examples that would enable me to understand how I can configure a JNDI lookup with a simple string (URL) as a return value.   I tried looking through the docs, but do not see anything there either.</p>
  
  <p>I found the following snippet on <a href="https://community.jboss.org/message/644991#644991" rel="nofollow">Jboss Forums</a>, but I do not understand how to use it at all.  I cannot find any documentation on <code>object-factory</code> - how to define the object-factory and/or even what it is or how it works (ie: which attributes must be set, what they  mean, etc):</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:naming:1.1"&gt;
      &lt;bindings&gt;
          &lt;object-factory name="java:/custom/dog" module="org.jboss.animalshelter" class="org.jboss.animalshelter.resource.DogFactory"/&gt;
      &lt;/bindings&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>I know how this was accomplished in JBoss AS6, but I cannot seem to understand how to do this for AS7.</p>
  
  <p>Can anyone point me in the right direction please?</p>
  
  <p>Thanks,</p>
  
  <p>Eric</p>