Re: How to create JNDI interface in Application Composer later ?

2013-05-27 Thread Romain Manni-Bucau
global jndi context (java:global) is injectable with @AppResource Context ctx; otherwise you can redo a new InitialContext normally *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/ *LinkedIn:

Re: How to create JNDI interface in Application Composer later ?

2013-05-27 Thread AndreasN
Hi, I tried different lookups, no one will work... The log stated: [OpenEJB] Auto-deploying ejb TestBean: EjbDeployment(deployment-id=TestBean) Injection by: @AppResource Context context; All lookups are null: obj = context.lookup(java:global/unit-name/ITestBean); obj =

Re: How to create JNDI interface in Application Composer later ?

2013-05-27 Thread Romain Manni-Bucau
hmm first it should be injactable in your test (@EJB), then the jndi name should be logged if not please reproduce it in a runnable sample *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/

Re: Customizing JNDI names for EJBs

2013-05-27 Thread AndrewClarke
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 =

Re: Customizing JNDI names for EJBs

2013-05-27 Thread Andrew Clarke
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

Re: Customizing JNDI names for EJBs

2013-05-27 Thread Romain Manni-Bucau
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

Re: How to create JNDI interface in Application Composer later ?

2013-05-27 Thread AndreasN
Ok, logging does the trick... I got 3 names, for now it's ok, but: The ProtocolTests is the test class here. The preferred first one name didn't work (the name=global is missing): 2013-05-27 15:12:26,924 INFO - OPENEJB [startup] Jndi(name=EarName/TestBean/remote) --

Re: Customizing JNDI names for EJBs

2013-05-27 Thread Andrew Clarke
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

Re: Abstract producer method cause UnsatisfiedResolutionException

2013-05-27 Thread John D. Ament
The answer's in the spec (JSR-299) A producer method must be a non-abstract method of a managed bean class or session bean class. Your abstract class is neither a managed bean nor a session bean. I also confirmed that your project doesn't run with weld. On Mon, May 27, 2013 at 9:57 AM, Reinis

Re: Invoke EJB on Glassfish

2013-05-27 Thread jply
Romain Manni-Bucau wrote If i understood you just need a remote lookup [...snip...] You understand correctly. I need to lookup EJBs on a Glassfish server from a webapp on a TomEE server. -- View this message in context:

Re: Invoke EJB on Glassfish

2013-05-27 Thread Romain Manni-Bucau
Is the lookup itself an issue? If so you can still write a small cdi extension to get remote ejb through @Inject, it is quite easy and portable. Le 28 mai 2013 00:41, jply jerry.pul...@apihotels.com a écrit : Romain Manni-Bucau wrote If i understood you just need a remote lookup [...snip...]