TechnoBuzz

A Techno Blog, mainly about Java

datasource in web.xml with JNDI

In the past I would establish a connection to a database like this:

Class.forName (Driver_string).newInstance ();
connection = DriverManager.getConnection (“jdbc:db2://localhost/qms”, user_name, “user_password”);

However, it is not a good idea to code such information in the application’s source code. They are all likely to change over time. Here on page 8 I learned you can use the web.xml to specify the datasource.

Advertisements

October 22, 2004 - Posted by | J2EE

10 Comments »

  1. I’m from Germany,can i get them over here?

    Comment by What is the best ipod dock? | October 24, 2012 | Reply

  2. I don’t even know the way I ended up right here, however I assumed this submit was once great. I do not recognise who you might be but certainly you are going to a well-known blogger for those who aren’t already.
    Cheers!

    Comment by Workers Compensation Attorney San Fernando Valley | February 16, 2013 | Reply

  3. Thank you for any other informative blog. The place else could I get that kind of information
    written in such a perfect method? I’ve a challenge that I’m simply now operating on,
    and I have been on the look out for such info.

    Comment by Visa for children of armed Forces | March 22, 2013 | Reply

  4. Thanks for any other magnificent article. Where else could
    anybody get that kind of information in such
    a perfect method of writing? I have a presentation subsequent week,
    and I’m at the look for such information.

    Comment by Immigration Lawyers in Brentwood | March 24, 2013 | Reply

  5. Hi there! I know this is kind of off topic
    but I was wondering if you knew where I could get a captcha plugin
    for my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

    Comment by http://24x7hours.com | April 28, 2013 | Reply

  6. My programmer is trying to persuade me to move to .

    net from PHP. I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using WordPress
    on various websites for about a year and am concerned
    about switching to another platform. I have heard great things about blogengine.
    net. Is there a way I can import all my wordpress content into it?

    Any help would be really appreciated!

    Comment by Quentin | May 18, 2013 | Reply

  7. Hi there, after reading this awesome post i am too happy to share my know-how here with mates.

    Comment by home away | July 22, 2013 | Reply

  8. It’s actually a nice and helpful piece of information. I’m glad that you simply shared this useful info with us.
    Please keep us informed like this. Thanks for sharing.

    Comment by taksim korku Evi | December 8, 2016 | Reply

  9. This info is worth everyone’s attention. When can I find out more?

    Comment by fontanero en granada | December 8, 2016 | Reply

  10. Thanks for the good writeup. It in fact was a amusement account it.
    Look complicated to far added agreeable from you!
    However, how can we keep in touch?

    Comment by Cabo San Lucas Yacht Charters | January 6, 2017 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: