Originally applied under WAS7.0, after porting to JBoss eap5.1.2, encountered some problems, hereby records:
1. Data Source Configuration
In was, when the data source name was obtained in DataSource, write directly to the data source name that was configured in was. Under JBoss, the Jndi name needs to start with the java:+ data source name. Was under the console to configure the data source, JBOSS, the database driver copied to%jboss_home%/server/default/lib/, and then to the JBOSS document to find the data source configuration template, this configuration template in docs/ Examples/jca directory, in this directory you can see a variety of database configuration template, find the Oracle configuration template, Oracle-ds.xml, copy it to%jboss_home%/server/default/deploy/. The database connection string, user name, password, and so on are then written correctly.
After the data source is published successfully, we can enter JBoss Management console, http://localhost:8080/jmx-console/, find jboss.jca This column, will find a lot of name=itcastds.service= .... , and when this data source is listed in the JBOSS.JCA column, it proves that our release was successful.
2. Web. XML configuration
Under WAS7, there must be a DOCTYPE declaration at the top of Web. XML, which is not available in JBoss, otherwise it cannot be started.
3. JVM Configuration
The default permsize of the JVM is only 4 m, and outofmemory:permsize exceptions occur when the jar packages and classes in the application are relatively long. At this point, you need to add the following JVM parameter configuration at the top of the%jboss_home%/bin/run.conf:
Set java_opts=-xms512m-xmx1024m-xx:maxnewsize=256m-xx:maxpermsize=256m
4. Head size exception appears
You can resolve this problem by specifying the maximum heap size, which is set java_opts=-xmx1024m
4, Jboss-web.xml
By default, some jar packages in your app also conflict with jar packages in JBoss. At this time add a jboss-web.xml under Web-inf, you can start normally, the contents are as follows:
<! DOCTYPE jboss-web Public "-//JBOSS//DTD Web application 5.0//en" "Http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd" >
<jboss-web>
<class-loading java2classloadingcompliance= ' true ' >
<loader-repository>
Com.example:archive=unique-archive-name
<loader-repository-config>
Java2parentdelegaton=true
</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
Problems with application deployment to JBoss