java-forum.org - Java programmieren aus Leidenschaft
Java 6 Einstieg und professioneller Einsatz
Alter Preis: 34,90 EUR
Jetzt: 0,00 EUR

zzgl. Versandkosten

Zurück   java-forum.org - Java programmieren aus Leidenschaft > Blogs > MQue

Bewerten

Migrate Web Appl to JBOSS 7

"Migrate Web Appl to JBOSS 7" bei Mister Wong speichern "Migrate Web Appl to JBOSS 7" bei YiGG.de speichern "Migrate Web Appl to JBOSS 7" bei Google speichern "Migrate Web Appl to JBOSS 7" bei del.icio.us speichern
Veröffentlicht: 27.03.2012 um 07:46 von MQue

  • In general: JBoss 7 has a new kernel which is inspired by OSGi, therefore module/bundle based
  • If ClassNotFoundException occures:
    put all external JARs into /WEB-INF/lib of your dynamic web project (JBoss AS 7 has it's own logging system but e.g. if you use log4j.jar but it into /WEB-INF/lib) or create a module in JBOSS_HOME/modules, in case of log4j: JBOSS_HOME/modules/org/apache/log4j/main, copy log4j.jar inside main and create a XML file like at the next point at Step 3 (module.xml)
    or define dependencies (similar to OSGi): https://docs.jboss.org/author/displa...DefFoundErrors
  • JBoss 7 doesn't work with xxx-ds.xml configuration files out of the box, Therefore in order to access dataSource over JNDI:
    1. create the directory structure: JBOSS_HOME/modules/com/oracle/ojdbc6/main
    2. put the JAR ojdbc6.jar into the main directory and further put this
    3. module.xml- file also into the main directory.
    4. add driver to drivers in standalone.xml (driver.xml)
    5. Afterwards go to your JBoss Administration Console (e.g. http://localhost:9990/console/App.ht...er/datasources) and create a new Datasource
    6. At Step 2 of the datasource- creation choose the driver- module added above (number 3)
    7. Now it is possible in the application to get the created DataSource e.g. with: InitialContext#lookup("dataSourceName");
  • If you use class com.sun.rowset.CachedRowSetImpl in your application you will probably get a NoClassDefFoundError, therefore add following lines at the module.xml of JBOSS_HOME/modules/sun/jdk/main
    1. <path name="com/sun/rowset"/>
    2. <path name="com/sun/rowset/internal"/>
    3. <path name="com/sun/rowset/providers"/>
  • System properties should/must be set in the Administration Console under "General Configuration -> System Properties", if you set it directly in standalone.xml (or domain.xml) it will be overwritten. Take care that there is no separate xxx.properties file - system properties in JBoss 7 are set in the standalone.xml- file at JBOSS_HOME/standalone/configuration
  • If you use common-codec.1.x.jar in your application, add this JAR into /WEB-INF/lib, there is a modul JBOSS_HOME/modules/org/apache/commons/codec but no binary is available

Kategorie: Kategorielos
Hits 1157 Kommentare 0
« Zurück     Startseite des Blogs     Nächste »
Kommentare 0

Kommentare

 

Alle Zeitangaben in WEZ +1. Es ist jetzt 09:18 Uhr.


Powered by vBulletin® Version 3.8.6 (Deutsch)
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Thanks for Smilies by smilies.4-user.de