On Jul 2, 2012, at 2:52 PM, exabrial wrote:

> Hey guys,
> 
> One of the features I'm missing from GlassFish is the ability to bind an
> ObjectFactory into JNDI. We have a few of these written and need to put them
> into our instance. I'm also hoping to write a brand new one that could be
> used to create JNDI links (see previous thread in mailing list).
> 
> Here's a simple example of a custom ObjectFactory: 
> http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.connectors/connectors-internal-api/3.0/org/glassfish/resources/custom/factory/PrimitivesAndStringFactory.java

Do you have an example of how that is configured?

I suspect that's not your only ObjectFactory, but note, you can put Primitives 
and Strings into <env-entry> elements and get them into JNDI in a standard way. 
 The standard technique also supports java.lang.Class and any Enum type.

As Romain notes, there might be something that can be done in the 
openejb/tomee.xml jar already using <Resource> to produce things which can then 
be consumed via @Resource.


-David

Reply via email to