Choose your Database, we use Postgresql.
Create a base called "guddi" and change your persistence.xml or DataSource in JBoss
If you chose another Database not forget to change the dependence in pom.xml.
postgresql </ groupId> postgresql </ artifactId> 9.1-901-1.jdbc4 </ version> </ Dependency>
To compile choice the profile tomcat7 (Eclipse and Netbeans)
The following excerpt from the web.xml should be commented: org.jboss.weld.environment.servlet.Listener </ listener-class> </ Listener> Create a module for your JDBC driver in JBoss:
Create the following directory structure $ JBOSS_HOME / modules / org / postgresql / main Module.xml Create a file in the directory with the following main content
Note that path in resource-root tag is the name of the driver jar
Copy the JDBC driver to the main directory. He can be reached at [http://jdbc.postgresql.org] (http://jdbc.postgresql.org/download.html)
The structure should look like:
org | _ Postgresql | | _ Main | | | _ Module.xml | | | _ Postgresql-9.1-902.jdbc4.jar
Declare your driver in standalone.xml File standalone.xml ($ JBOSS_HOME / standalone / configuration / standalone.xml) locate the tag and insert the following snippet: inside there will be a tag . Enter the following code inside :
org.postgresql.xa.PGXADataSource </ xa-datasource-class> </ Driver>
Create a DataSource for your JDBC connection in standalone.xml Standalone.xml file, together with the statement of the driver, insert the following snippet:
jdbc: postgresql :/ / desenv-db01/guddi org.postgresql.Driver postgresql User password false false falsechange credentials.
Start Jboss and make application build using the following command. The maven will deploy in jboss
mvn install-P jboss7
To compile the profile jboss7 choice (Eclipse and Netbeans)