Showing posts with label approaches to load jar files. Show all posts
Showing posts with label approaches to load jar files. Show all posts

Saturday, January 31, 2009

Approaches to load jar files

There are two approaches to load jar files not from (web-inf/lib)

Step1: Create lib folder inside DAMS-Ear/Ear Content. Place the required jar files inside the lib. JBoss will by default add all these jars to classpath of the application and make them available.

Step2: Add dependent or component jars in application.xml file in Ear and deploy the web-app

<?xml version="1.0" encoding="UTF-8"?>

<application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

<display-name>DAMS-Ear</display-name>

<module id="WebModule_1233318064937">

        <web>

            <web-uri>DAMS-Web.war</web-uri>

            <context-root>DAMS-Web</context-root>

        </web>

    </module>

    <module >    

     <java>DAMS-xxx.jar</java>    

    </module>

        

</application>

We add each module as shown above

Note: In eclipse Ear shows errors but application is deployed

Let me know if you have any queries…..