user3280876
user3280876

Reputation: 51

How to decalare a new datasource in jboss as 7

As I know with the new JBoss application server, there is 2 ways to declare datasources :

My questions are :

  1. what is the best way to declare datasources in term of (best practices/maintainability,.. )
  2. If I use the 2sd way, does my datasource shared between all ear deployed?

Thanks in advance

Upvotes: 1

Views: 81

Answers (1)

Francesco Marchioni
Francesco Marchioni

Reputation: 4328

The best way (and safest) to add a datasource is by means of adding at first a new module for the JDBC driver, then creating a datasource which uses the JDBC driver as a module. See here how to create a datasource with JBoss AS 7
Deploying a datasource along with your application should be used for test purposes only as it is won't be manageable from the AS 7 Console/CLI this way.
Regards

Upvotes: 1

Related Questions