a little workaround would be a @Singleton @Startup + @PostConstruct to force this property from your app at startup ;)
*Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/5/27 Andrew Clarke <[email protected]> > No, that doesn't work. Other than for the sake of troubleshooting it's a > moot point anyway, as JNDI names are hard-coded within this application I'm > porting. That's why I'm trying to match them. I have this working in > system.properties, thanks to your help. > > - Andrew. > > On 2013-05-27, at 11:26, Romain Manni-Bucau <[email protected]> wrote: > > > even using java: before the name? > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > *Github: https://github.com/rmannibucau* > > > > > > > > 2013/5/27 Andrew Clarke <[email protected]> > > > >> Yeah. When I exclude that setting, it seems to only let me use the > global > >> JNDI name (java:global/tomeetest/ApplicationManager). I'm not sure why > >> that is, so I just assumed I have to set a different > >> java.naming.factory.initial in order to use my own JNDI naming format. > >> This is what I get if I don't set LocalInitialContextFactory: > >> > >> javax.naming.NameNotFoundException: Name > >> [tomeetest/ApplicationManager/remote] is not bound in this Context. > Unable > >> to find [tomeetest]. > >> > >> - Andrew. > >> > >> On 2013-05-27, at 11:17, Romain Manni-Bucau <[email protected]> > wrote: > >> > >>> did you try without java.naming.factory.initial? > >>> > >>> *Romain Manni-Bucau* > >>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > >>> *Blog: **http://rmannibucau.wordpress.com/*< > >> http://rmannibucau.wordpress.com/> > >>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > >>> *Github: https://github.com/rmannibucau* > >>> > >>> > >>> > >>> 2013/5/27 AndrewClarke <[email protected]> > >>> > >>>> Thank you for the response. I put the following lines in > >>>> conf/system.properties and everything worked fine: > >>>> > >>>> java.naming.factory.initial = > >>>> org.apache.openejb.client.LocalInitialContextFactory > >>>> openejb.deploymentId.format = {ejbJarId}/{ejbName} > >>>> openejb.jndiname.format = > >> {deploymentId}/{interfaceType.annotationNameLC} > >>>> > >>>> Ideally I'd like to deploy these within my application. I can set the > >>>> formats in WEB-INF/openejb-jar.xml, but I can't sort out where to set > >>>> java.naming.factory.initial, other than in Properties object or > >> Tomcat-wide > >>>> in system.properties. This isn't a crucial issue, but something I'd > >> just > >>>> like to ideally sort out. > >>>> > >>>> Thanks again, > >>>> - Andrew. > >>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> > >> > http://openejb.979440.n4.nabble.com/Customizing-JNDI-names-for-EJBs-tp4663215p4663252.html > >>>> Sent from the OpenEJB User mailing list archive at Nabble.com. > >>>> > >> > >> > >
