[jboss-as7-dev] SIP subsystem - How to map JNDI resources
JMRecio
josemrecio at gmail.com
Sat May 12 21:09:46 EDT 2012
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-servlets-as7-drop-in/jboss-as-mobicents/src/main/java/org/mobicents/as7/deployment
- 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%20Servlets/Mobicents%20Sip%20Servlets%201.7.0.FINAL/mss-1.7.0.FINAL-jboss-as-7.1.1.Final-1334053065.zip/download
- 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
More information about the jboss-as7-dev
mailing list