Skip to Content
author's profile photo Former Member
Former Member

Connect to DB2 database via JNDI

I am currently using the evaluation copy of the NetWeaver SAP and would like to use the DB2 as back end. In order to connect to the database, a JDBC data source is created. But it is not clear how to connect to the JDBC DataSource from the J2EE application developed in Net Weaver.

This question was also raised by Saumya Dutta Gupta on 23d Nov - but no answers! Come on guys SOMEBODY out there should be able to help us!

Thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 01, 2005 at 01:01 PM

    Hi Ashley,

    There are a lot of comprehensive manuals on In your case you could start with this">this> one.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI Ashley,

      FOr connecting with the DB try out this following code:

      InitialContext ctx=new InitialContext();

      DataSource ds=(DataSource)ctx.lookup("jdbc/<db alias name>");

      Connection con=ds.getConnection();

      THis may workout.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.