Friday, January 22, 2010

Place your applications in desired directory

To place your own applications in desired directory in JBOSS,

1) Edit the file /opt/jboss-eap-5.0/jboss-as/server/default/conf/bootstrap/profile.xml
Include your application directories as shown below.

<bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.repository.StaticProfileFactory">
<property name="bindingsURI">${jboss.server.home.url}conf/bindingservice.beans</property>
<property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
<property name="deployersURI">${jboss.server.home.url}deployers</property>
<property name="applicationURIs">
<list elementclass="java.net.URI">
<value>${jboss.server.home.url}deploy</value>
<value>file:///opt/customApps</value>
</list>
</property>
<property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>
<property name="profileFactory"><inject bean="ProfileFactory"></inject></property>
</bean>

2) Edit the file /opt/jboss-eap-5.0/jboss-as/server/default/conf/bootstrap/vfs.xml
Include an entry block for the application directories as shown below.

        <entry>
          <key>${jboss.server.lib.url}</key>
          <value><inject bean="VfsNamesExceptionHandler"/></value>
        </entry>
        <entry>
          <key>file:///opt/customLibs</key>
          <value><inject bean="VfsNamesExceptionHandler"/></value>
        </entry>
        <entry>
          <key>${jboss.server.home.url}deploy</key>
          <value><inject bean="VfsNamesExceptionHandler"/></value>
        </entry>
        <entry>
          <key>file:///opt/customApps</key>
          <value><inject bean="VfsNamesExceptionHandler"/></value>
        </entry>

3) Restart the server for the change to take effect.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home

Newer›  ‹Older