Status: New
Owner: ----

New issue 2352 by [email protected]: Couldn't get datasource from SipServlet. Bu we can get from HttpServlet.
http://code.google.com/p/mobicents/issues/detail?id=2352

What steps will reproduce the problem?
1.Create a sample sip servlet. Create datasource with ...-ds.xml.
2.Try to get datasource from your SipServlet code.
3.You can get context but when you lookup in context, you can’t get datasource.

What is the expected output? What do you see instead?
We are expecting to get datasource from our SipServlet like below, but exception says jdbc “not bound”.
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/psr");

What version of the product are you using? On what operating system?
(Mobicents) mss-1.5.0.FINAL-jboss-jdk6-5.1.0.GA
Linux jboss 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux

Please provide any additional information below.
We solved this problem by performing these steps :
1. Creating our Sip Servlet application. (Ourservlet extends SipServlet implements Servlet)
2.      Adding another servlet which is Http. (InitServlet extends HttpServlet)
3. We can get datasource from this Http Servlet. Then we gave this datasource to our DbManager and we solved this problem.

We want to learn why we have to write a additional Http Servlet to be able to get datatsource. We want to get datasource directly from our SipServlet. Could there be a bug in this Mobicent version ?
Any suggestions ?

Best Regards,

Alper Ozdamar
Software Engineer
Argela Technology

Reply via email to