Re: javax.naming.OperationNotSupportedException:+Context+is+read+only

2016-09-27 Thread gchauvet
Bump on this thread because I have the same issue. Below my context (a servlet project) : 1) I've defined a Datasource in tomee.xml with id "test/dossier" (used in a another EJB project with @Resource annotation without issue). 2) In my web.xml file, adding a new section : jdbc/test/dossi

Re: javax.naming.OperationNotSupportedException:+Context+is+read+only

2016-09-27 Thread Svetlin Zarev
Hi. Section 5.3.4 of the jee spec: The container must ensure that the application component instances have only read access to their naming context. The container must throw the javax.naming.OperationNotSupportedException from all the methods of the javax.naming.Context interface that modify the e

Re: javax.naming.OperationNotSupportedException:+Context+is+read+only

2016-09-27 Thread gchauvet
Hi, Well, okay but if I change my code final Context ic = new InitialContext(); ic.createSubcontext("java:comp/env/jdbc"); by InitialContext.doLookup("java:comp/env/jdbc/" + name); and I remove Resource section inside my war context.xml all works gracefully :) -- View this message in con

Re: javax.naming.OperationNotSupportedException:+Context+is+read+only

2016-09-27 Thread Romain Manni-Bucau
that's what Svetlin said, createSubcontext is a write operation where lookup is a read one. Only read ones are allowed. Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github

Re: Migrating EJB from Jboss to TomEE

2016-09-27 Thread luca-vercelli
After 2 weeks, I can finally work on this again. Apparently, the Jndi names are completely different between JBoss and TomEE. For example, where in JBoss I had: "LogCaricamentoService/local" and "queue/massiveLoading/load" and in TomEE I had to write: "java:openejb/Deployment/LogCaricamentoServi

Re: Migrating EJB from Jboss to TomEE

2016-09-27 Thread Romain Manni-Bucau
Welcome back ;) 2016-09-27 15:59 GMT+02:00 luca-vercelli : > After 2 weeks, I can finally work on this again. > > Apparently, the Jndi names are completely different between JBoss and > TomEE. > For example, where in JBoss I had: > "LogCaricamentoService/local" > and > "queue/massiveLoading/load

RE: Migrating EJB from Jboss to TomEE

2016-09-27 Thread Jay Leggett
I had to make similar changes to get EJBs working when migrating from Websphere to TomEE. I am not an EJB expert, but I think recent updates of the spec are trying to make the namespace universal to avoid vendor-specific namespaces. Also, TomEE's system.properties has a "openejb.jndiname.for

RE: Migrating EJB from Jboss to TomEE

2016-09-27 Thread luca-vercelli
Thank you both. @Romain: you were right, I can access the same object using another jndi name, it is "java:global/app1/LogCaricamentoService!it.packagename.LogCaricamentoServiceLocal" @jayleg: thank you, however I prefer to understand how TomEE works, and to use its conventions. Now, I still hav

Re: Migrating EJB from Jboss to TomEE

2016-09-27 Thread Romain Manni-Bucau
@Management is a jboss import right? this doesnt mean anything outside jboss (like @Service), maybe add @Singleton Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github

Duplicate pages on tomee website

2016-09-27 Thread gchauvet
Hi Pages for about TomEE "daemonization" are the same : http://tomee.apache.org/deamon/lin-service.html http://tomee.apache.org/deamon/win-service.html -- View this message in context: http