Hello, Stuart,
I finally managed to fix this and I just wanted to say thanks for your
help, your pointers were very helpful. SIP subsystem deployment now
creates SIP specific JNDI bindings in java:comp/env (see JSR-289,
sections 7.12 and 13.1.2).
It has taken longer than expected (I waited for 7.1.2.Final availability
so the port is compatible with EAP 6 and had to find time from other
commitments), this is the commit in case you are interested:
https://code.google.com/p/sipservlets/source/detail?r=66966cf43f87
Thanks again for your help,
JM
On 13/05/12 04:17, Stuart Douglas wrote:
To setup JNDI you use
org.jboss.as.naming.context.NamespaceContextSelector#pushCurrentSelector
The existing setup is done by
org.jboss.as.ee.naming.JavaNamespaceSetup
Which is attached to the deployment under
org.jboss.as.server.deployment.Attachments#SETUP_ACTIONS
and
org.jboss.as.ee.component.Attachments#WEB_SETUP_ACTIONS
in org.jboss.as.ee.naming.ModuleContextProcessor.
Stuart
On 13/05/2012, at 11:09 AM, JMRecio wrote:
> Hello, experts,
>
> I started porting Mobicents SIP Servlets framework to AS7, as a
> subsystem build on top of on top of 7.1.1.Final, taking advantage of the
> WebContextFactory extension.
>
> Port is quite functional already, but I am stuck at one point: sip
> servlets do not have access to java:com and java:app JDNI tree, lookup
> fails with javax.naming.NameNotFoundException. @Resource mappings work
> ok though. HTTP Servlets and EJB can access ok to those parts of the
> JNDI tree.
>
> Any hint on where/how JNDI access is setup for HTTP servlets
> deployments? I can take it from there.
>
> More details below, including pointers to the soure and a test project
> that shows the behaviour on top of the AS7 release.
>
> Any help is much appreciated.
>
> JM
>
> ---
>
> Additional details:
>
> - sip subsystem deployer code:
>
>
http://code.google.com/p/sipservlets/source/browse/containers/sip-servlet...
>
> - test project showcasing the problem in
>
http://github.com/josemrecio/test5-as7-sip
>
> build with mvn clean install and deploy on the pre-packaged Mobicents
> AS7 release
>
> start AS7 as:
>
> $ bin/standalone.sh -c standalone-sip.xml
> -Djavax.servlet.sip.dar=file:///dev/null
>
> - Mobicents AS7 release:
>
>
http://sourceforge.net/projects/mobicents/files/Mobicents%20Sip%20Servlet...
>
> - JNDI dump from a SIP Servlet and a HTTP Servlet in the same war and
> ear component follows.
> Note that HTTP Servlet has access to the full JNDI tree, but SIP Servlet
> can't access java:comp or java:app
>
> Dump Jndi view for SIP Servlet:
> / context:
> \__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
> java: context:
> \__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
> javax.naming.NameNotFoundException: java:app
> java:global context:
> test5-as7-sip-ear
> test5-as7-sip-ejb
> \__com.chema.ejb.PocheteEjbLocal$$$view18 TheEjb
> \__com.chema.ejb.PocheteEjbLocal$$$view18
> TheEjb!com.chema.ejb.PocheteEjbLocal
> javax.naming.NameNotFoundException: java:comp
> Done...
>
> Dump Jndi view for HTTP Servlet:
> / context:
> \__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
> java: context:
> \__com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate TransactionManager
> java:app context:
> \__java.lang.String AppName
> \__org.jboss.as.naming.NamingContext env
> sip
> test5
> \__org.mobicents.servlet.sip.message.SipFactoryFacade SipFactory
> \__org.mobicents.servlet.sip.core.session.SipSessionsUtilImpl
> SipSessionsUtil
> \__org.mobicents.servlet.sip.core.timers.TimerServiceImpl TimerService
> test5-as7-sip-ejb
> \__com.chema.ejb.PocheteEjbLocal$$$view6 TheEjb
> \__com.chema.ejb.PocheteEjbLocal$$$view6
> TheEjb!com.chema.ejb.PocheteEjbLocal
> java:global context:
> test5-as7-sip-ear
> test5-as7-sip-ejb
> \__com.chema.ejb.PocheteEjbLocal$$$view6 TheEjb
> \__com.chema.ejb.PocheteEjbLocal$$$view6
> TheEjb!com.chema.ejb.PocheteEjbLocal
> java:app/sip context:
> test5
> \__org.mobicents.servlet.sip.message.SipFactoryFacade SipFactory
> \__org.mobicents.servlet.sip.core.session.SipSessionsUtilImpl
> SipSessionsUtil
> \__org.mobicents.servlet.sip.core.timers.TimerServiceImpl TimerService
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev