Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection pool in jboos

 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how a connection pool is created in jboss... also about the dao pattern in jboss
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can easily create a connection pool by writing and deploying a *-ds.xml file. See the docs/examples/jca directory for examples.

What is it that you want to know about DAO? There is nothing special that must be done in JBoss AS. Though you might want to look at JPA.
 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to connect my web application to the database..is it required to write the below code in each and every servlet

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That all depends. If you are doing your own JDBC calls then yes you must have some code like that to obtain a connection. If you are using JPA entity beans, however, you do not have to write that code (instead you configure the entity manager to indicate which datasource to use). Or you could use an @Resource annotation to inject the data source.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic