1

I am supposed to use JBoss connection pooling for my application.Right now I don't have any idea about that. I Googled but couldn't get any good link.
Can you please share any good link which describes how to define data source, create and use connections in Java ?

1 Answer 1

3

Probably this is what you r looking for: http://www.coderanch.com/t/89511/JBoss/Connection-Pooling

This snippet returns the database connection as declared in the xml fragment:

InitialContext jndiCntx = new InitialContext();  
DataSource ds = (DataSource)jndiCntx.lookup("java:/yourdsname"); 
connection = ds.getConnection(); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.