2 Replies Latest reply on Jul 23, 2014 12:53 PM by Alex Renger

    How to deploy JackRabbit on JBoss 7.1.1?

    ci vi Newbie

      Hi,

      i want to deploy last stable release of JackRabbit on JBoss 7.1.1.

      I'm followed this document: Jackrabbit Deployment in AS6 and AS7

       

      My installation directory of jboss on linux centos is: /home/jbserver/jboss-a s-7.1.1.Final

      I created the directory /home/jbserver/jboss-a s-7.1.1.Final/modules/javax/jcr/main/

      Into this directory I pasted the file jcr-2.0.jar downloaded here https://jcp.org/aboutJava/communityprocess/final/jsr283/index.html and I created two files:

      - jcr-2.0.jar.index

      with this content:

      META-INF

      META-INF/maven

      META-INF/maven/javax.jcr

      META-INF/maven/javax.jcr/jcr

      javax

      javax/jcr

      javax/jcr/lock

      javax/jcr/nodetype

      javax/jcr/observation

      javax/jcr/query

      javax/jcr/query/qom

      javax/jcr/retention

      javax/jcr/security

      javax/jcr/util

      javax/jcr/version

       

      and

      - module.xml

      with this content:

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

       

      <module xmlns="urn:jboss:module:1.0" name="javax.jcr">

        <dependencies>

          <module name="javax.transaction.api" export="true"/>

            </dependencies>

       

      <resources>

        <resource-root path="jcr-2.0.jar"/>

          <!-- Insert resources here -->

      </resources>

      </module>

       

      I downloaded this RAR: http://www.apache.org/dyn/closer.cgi/jackrabbit/2.6.5/jackrabbit-jca-2.6.5.rar

      I've unrar it and modified META-INF/MANIFEST.MF as:

      Manifest-Version: 1.0

      Archiver-Version: Plexus Archiver

      Created-By: Apache Maven

      Built-By: jzitting

      Build-Jdk: 1.7.0_40

      Dependencies: javax.jcr export,org.slf4j

      and META-INF/ra.xml as:

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

      <!--

         Licensed to the Apache Software Foundation (ASF) under one or more

         contributor license agreements.  See the NOTICE file distributed with

         this work for additional information regarding copyright ownership.

         The ASF licenses this file to You under the Apache License, Version 2.0

         (the "License"); you may not use this file except in compliance with

         the License.  You may obtain a copy of the License at

       

             http://www.apache.org/licenses/LICENSE-2.0

       

         Unless required by applicable law or agreed to in writing, software

         distributed under the License is distributed on an "AS IS" BASIS,

         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

         See the License for the specific language governing permissions and

         limitations under the License.

        -->

      <connector 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/connector_1_5.xsd"

                 version="1.5">

       

        <display-name>Apache Jackrabbit JCR Adapter</display-name>

        <vendor-name>The Apache Software Foundation</vendor-name>

        <eis-type>JCR Adapter</eis-type>

        <resourceadapter-version>1.0</resourceadapter-version>

       

        <resourceadapter>

          <resourceadapter-class>

            org.apache.jackrabbit.jca.JCAResourceAdapter

          </resourceadapter-class>

          <outbound-resourceadapter>

            <connection-definition>

              <managedconnectionfactory-class>

                org.apache.jackrabbit.jca.JCAManagedConnectionFactory

              </managedconnectionfactory-class>

       

              <config-property>

                <config-property-name>RepositoryURI</config-property-name>

                <config-property-type>java.lang.String</config-property-type>

              </config-property>

              <config-property>

                <config-property-name>HomeDir</config-property-name>

                <config-property-type>java.lang.String</config-property-type>

                <config-property-value>/home/jbserver/jboss-as-7.1.1.Final/repository</config-property-value>

              </config-property>

              <config-property>

                <config-property-name>ConfigFile</config-property-name>

                <config-property-type>java.lang.String</config-property-type>

                <config-property-value>/home/jbserver/jboss-as-7.1.1.Final/repository/repository.xml</config-property-value>

              </config-property>

       

              <connectionfactory-interface>

                javax.jcr.Repository

              </connectionfactory-interface>

              <connectionfactory-impl-class>

                org.apache.jackrabbit.jca.JCARepositoryHandle

              </connectionfactory-impl-class>

       

              <connection-interface>

                javax.jcr.Session

              </connection-interface>

              <connection-impl-class>

                org.apache.jackrabbit.jca.JCASessionHandle

              </connection-impl-class>

            </connection-definition>

       

            <transaction-support>XATransaction</transaction-support>

            <reauthentication-support>false</reauthentication-support>

          </outbound-resourceadapter>

        </resourceadapter>

       

      </connector>

      I created directory /home/jbserver/jboss-as-7.1.1.Final/repository and file repository.xml into it, with this content:

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

      <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.5//EN"

        "http://jackrabbit.apache.org/dtd/repository-1.5.dtd">

        <Repository>

        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">

          <param name="driver" value="javax.naming.InitialContext"/>

            <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

              <param name="schema" value="postgresql"/>

                <param name="schemaObjectPrefix" value="fsrep_"/>

                </FileSystem>

                <Security appName="Jackrabbit">

                <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"></AccessManager>

                <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">

                  <param name="anonymousId" value="anonymous" />

                  </LoginModule>

                  </Security>

                  <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">

                  <param name="driver" value="javax.naming.InitialContext"/>

                  <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

                  <param name="databaseType" value="postgresql"/>

                    <param name="schemaObjectPrefix" value="ds_" />

                    </DataStore>

                    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />

                    <Workspace name="default">

                      <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">

                        <param name="driver" value="javax.naming.InitialContext"/>

                          <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

                            <param name="schema" value="postgresql"/>

                            <param name="schemaObjectPrefix" value="fsws_${wsp.name}_"/>

                              </FileSystem>

                                <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager">

                                <param name="driver" value="javax.naming.InitialContext"/>

                                <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

                                  <param name="schema" value="postgresql" />

                                    <param name="schemaObjectPrefix" value="pm_${wsp.name}_" />

                                      <param name="externalBLOBs" value="false" />

                                        </PersistenceManager>

                                        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">

                                          <param name="path" value="${wsp.home}/index" />

      <param name="useCompoundFile" value="true" />

                                              <param name="minMergeDocs" value="100" />

                                                <param name="volatileIdleTime" value="3" />

                                                <param name="maxMergeDocs" value="100000" />

                                                  <param name="mergeFactor" value="10" />

                                                    <param name="maxFieldLength" value="10000" />

                                                      <param name="bufferSize" value="10" />

                                                        <param name="cacheSize" value="1000" />

                                                          <param name="forceConsistencyCheck" value="false" />

                                                            <param name="autoRepair" value="true" />

                                                              <param name="analyzer" value="org.apache.lucene.analysis.standard.StandardAnalyzer" />

                                                                <param name="queryClass" value="org.apache.jackrabbit.core.query.QueryImpl" />

                                                                  <param name="respectDocumentOrder" value="true" />

                                                                    <param name="resultFetchSize" value="2147483647" />

                                                                      <param name="extractorPoolSize" value="3" />

                                                                        <param name="extractorTimeout" value="100" />

                                                                          <param name="extractorBackLogSize" value="100" />

                                                                            <param name="textFilterClasses"

                                                                              value="org.apache.jackrabbit.extractor.MsWordTextExtractor,

      value="org.apache.jackrabbit.extractor.MsWordTextExtractor,

                                                                                org.apache.jackrabbit.extractor.MsExcelTextExtractor,

                                                                                  org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,

                                                                                    org.apache.jackrabbit.extractor.PdfTextExtractor,

                                                                                      org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,

                                                                                        org.apache.jackrabbit.extractor.RTFTextExtractor,

                                                                                          org.apache.jackrabbit.extractor.HTMLTextExtractor,

                                                                                            org.apache.jackrabbit.extractor.PlainTextExtractor,

                                                                                              org.apache.jackrabbit.extractor.XMLTextExtractor" />

                                                                                                </SearchIndex>

                                                                                                </Workspace>

                                                                                                <Versioning rootPath="${rep.home}/version">

                                                                                                  <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">

                                                                                                    <param name="driver" value="javax.naming.InitialContext"/>

                                                                                                      <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

                                                                                                        <param name="schema" value="postgresql"/>

                                                                                                        <param name="schemaObjectPrefix" value="fsver_"/>

                                                                                                          </FileSystem>

                                                                                                            <PersistenceManager class="org.apache.jackrabbit.core.persistence$

                                                                                                            <param name="driver" value="javax.naming.InitialContext"/>

                                                                                                            <param name="url" value="java:jboss/datasources/DocumentStoreDS"/>

                                                                                                              <param name="schema" value="postgresql" />

                                                                                                                <param name="schemaObjectPrefix" value="version_" />

                                                                                                                  <param name="externalBLOBs" value="false" />

                                                                                                                  </PersistenceManager>

                                                                                                                  </Versioning>

                                                                                                                  </Repository>

       

      I've created in eclipse a dynamic web project "test" with this jsp "test.jsp":

      <%@ page language="java"

          import="java.util.*,java.io.*,javax.naming.*, javax.jcr.*,org.apache.jackrabbit.api.*,org.apache.jackrabbit.core.*"

          errorPage=""%>

      <html>

      <body>

          <%

              Context ctx = new InitialContext();

              // Repository repository = (Repository) ctx.lookup("java:/jca/DocumentStore") ;  //For JBoss 6

              Repository repository = (Repository) ctx.lookup("jca/DocumentStore"); //For JBoss 7

          %>

          <pre>

      Have Repository Reference: <%=repository.toString()%>

      <%

          Session ses = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));

      %>

      Have logged in

      <%

          try {

              JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager) ses

                      .getWorkspace().getNodeTypeManager();

              // Register the custom node types defined in the CND file

              manager.registerNodeTypes(new FileInputStream(

                      "/home/jbserver/jboss-as-7.1.1.Final/repository/schema.cnd"),

                      JackrabbitNodeTypeManager.TEXT_X_JCR_CND);

      %>

      Loaded Node Definitions

      <%

          Node root = ses.getRootNode();

       

              // Store content

              Node docGroup = root

                      .addNode("documents_1", "inf:documentGroup");

              Node attr = docGroup.addNode("inf:attributes", "inf:attribute");

              attr.setProperty("inf:key", "name");

              attr.setProperty("inf:value", "a value");

              Node doc = docGroup.addNode("inf:documents", "inf:document");

              Node dpage = doc.addNode("inf:pages", "inf:content");

              Node data = dpage.addNode("inf:data", "nt:resource");

              data.setProperty("jcr:data", "stuff");

              docGroup.setProperty("inf:description",

                      "Hello, World, this is a Document Group");

              doc.setProperty("inf:description",

                      "Hello, World, this is a Document");

              dpage.setProperty("inf:description",

                      "Hello, World, this is a Page");

      %>

      Created nodes, about to persist...

      <%

          ses.save();

      %>

      Persisted nodes. Retrieve one back.

      <%

          // Retrieve content

              Node node = root.getNode("documents_1/inf:documents");

      %>

      node.getPath() = <%=node.getPath()%>

        node.getProperty("message").getString() = <%=node.getProperty("inf:description").getString()%>

      <%

          // Remove content

              root.getNode("documents_1").remove();

              ses.save();

          } catch (Throwable e) {

      %>

      Exception: <%=e.toString()%>

      <%

          } finally {

              ses.logout();

          }

      %>

       

       

      </body>

      </html

      I've exported war of my dynamic project and I deployed it on jboss.

      when I try to access to http://localhost:8080/test/test.jsp

      I have this error message:

       

      HTTP Status 500 -


      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: javax.naming.NameNotFoundException: jca/DocumentStore -- service jboss.naming.context.java.jca.DocumentStore org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791) org.apache.jsp.test_jsp._jspService(test_jsp.java:157) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 

      root cause

      javax.naming.NameNotFoundException: jca/DocumentStore -- service jboss.naming.context.java.jca.DocumentStore org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97) org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178) org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113) org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214) javax.naming.InitialContext.lookup(InitialContext.java:411) org.apache.jsp.test_jsp._jspService(test_jsp.java:67) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 

      note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.


      this is my standalone.xml:

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

       

      <server xmlns="urn:jboss:domain:1.2">

       

          <extensions>

              <extension module="org.jboss.as.clustering.infinispan"/>

              <extension module="org.jboss.as.configadmin"/>

              <extension module="org.jboss.as.connector"/>

              <extension module="org.jboss.as.deployment-scanner"/>

              <extension module="org.jboss.as.ee"/>

              <extension module="org.jboss.as.ejb3"/>

              <extension module="org.jboss.as.jaxrs"/>

              <extension module="org.jboss.as.jdr"/>

              <extension module="org.jboss.as.jmx"/>

              <extension module="org.jboss.as.jpa"/>

              <extension module="org.jboss.as.logging"/>

              <extension module="org.jboss.as.mail"/>

              <extension module="org.jboss.as.naming"/>

              <extension module="org.jboss.as.osgi"/>

              <extension module="org.jboss.as.pojo"/>

              <extension module="org.jboss.as.remoting"/>

              <extension module="org.jboss.as.sar"/>

              <extension module="org.jboss.as.security"/>

              <extension module="org.jboss.as.threads"/>

              <extension module="org.jboss.as.transactions"/>

              <extension module="org.jboss.as.web"/>

              <extension module="org.jboss.as.webservices"/>

              <extension module="org.jboss.as.weld"/>

          </extensions>

       

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <authentication>

                          <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket-binding native="management-native"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket-binding http="management-http"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

          <profile>

              <subsystem xmlns="urn:jboss:domain:logging:1.1">

                  <console-handler name="CONSOLE">

                      <level name="INFO"/>

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                      </formatter>

                  </console-handler>

                  <periodic-rotating-file-handler name="FILE">

                      <formatter>

                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.apache.tomcat.util.modeler">

                      <level name="WARN"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb.config">

                      <level name="ERROR"/>

                  </logger>

                  <root-logger>

                      <level name="INFO"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>

              <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                          <driver>h2</driver>

                          <security>

                              <user-name>sa</user-name>

                              <password>sa</password>

                          </security>

                      </datasource>

                     

                      <datasource jta="true" jndi-name="java:jboss/datasources/DocumentStoreDS" pool-name="DocumentStoreDS_Pool" enabled="true" use-java-context="false" use-ccm="true">

                          <connection-url>jdbc:postgresql://localhost/documentstore</connection-url>

                          <driver-class>org.postgresql.Driver</driver-class>

                          <driver>postgresql-9.2-1003.jdbc4.jar</driver>

                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                          <pool>

                              <min-pool-size>3</min-pool-size>

                              <max-pool-size>15</max-pool-size>

                              <prefill>true</prefill>

                              <use-strict-min>false</use-strict-min>

                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                          </pool>

                          <security>

                              <user-name>postgres</user-name>

                              <password>postgres</password>

                          </security>

                          <validation>

                              <check-valid-connection-sql>select 1</check-valid-connection-sql>

                              <validate-on-match>false</validate-on-match>

                              <background-validation>false</background-validation>

                              <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>

                          </validation>

                          <timeout>

                              <blocking-timeout-millis>60000</blocking-timeout-millis>

                              <idle-timeout-minutes>15</idle-timeout-minutes>

                          </timeout>

                          <statement>

                              <track-statements>TRUE</track-statements>

                          </statement>

                      </datasource>

                      <drivers>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

                  <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

              <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple" aliases="NoPassivationCache"/>

                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                  </caches>

                  <passivation-stores>

                      <file-passivation-store name="file"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default">

                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                  </timer-service>

                  <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                  <thread-pools>

                      <thread-pool name="default">

                          <max-threads count="10"/>

                          <keepalive-time time="100" unit="milliseconds"/>

                      </thread-pool>

                  </thread-pools>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">

                  <cache-container name="hibernate" default-cache="local-query">

                      <local-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="local-query">

                          <transaction mode="NONE"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="timestamps">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>

                      </local-cache>

                  </cache-container>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jca:1.1">

                  <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                  <bean-validation enabled="true"/>

                  <default-workmanager>

                      <short-running-threads>

                          <core-threads count="50"/>

                          <queue-length count="50"/>

                          <max-threads count="50"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </short-running-threads>

                      <long-running-threads>

                          <core-threads count="50"/>

                          <queue-length count="50"/>

                          <max-threads count="50"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </long-running-threads>

                  </default-workmanager>

                  <cached-connection-manager/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jmx:1.1">

                  <show-model value="true"/>

                  <remoting-connector/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                  <jpa default-datasource=""/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:mail:1.0">

                  <mail-session jndi-name="java:jboss/mail/Default">

                      <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                  </mail-session>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:naming:1.1"/>

              <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">

                  <properties>

                      <property name="org.osgi.framework.startlevel.beginning">

                          1

                      </property>

                  </properties>

                  <capabilities>

                      <capability name="javax.servlet.api:v25"/>

                      <capability name="javax.transaction.api"/>

                      <capability name="org.apache.felix.log" startlevel="1"/>

                      <capability name="org.jboss.osgi.logging" startlevel="1"/>

                      <capability name="org.apache.felix.configadmin" startlevel="1"/>

                      <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>

                  </capabilities>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

              <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                  <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

              <resource-adapters>

      <resource-adapter>

      <archive>

        jackrabbit-jca-2.6.5.rar

        </archive>

        <transaction-support>

        XATransaction

        </transaction-support>

        <connection-definitions>

          <connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory"

            jndi-name="java:/jca/DocumentStore" enabled="true" use-java-context="true"

              pool-name="jackrabbit-jca-2_6_5_rar-Pool" use-ccm="true">

              <!-- There is a bug in JBoss that prevents the following configuration of the

                   properties from working in builds of JBoss AS 7.1.0 prior to August 5th

                   so these two property definitions should be left out and configured in the

                   ra.xml file in the resource adapter for builds earlier than that (including

                   the 7.0.0.Final version). See below and also the bug report at

                   https://issues.jboss.org/browse/AS7-1452

                   -->

      <config-property name="HomeDir">

      /home/jbserver/jboss-as-7.1.1.Final/repository

      </config-property>

      <config-property name="ConfigFile">

      /home/jbserver/jboss-as-7.1.1.Final/repository/repository.xml

      </config-property>

        <pool>

          <min-pool-size>

            3

              </min-pool-size>

                <max-pool-size>

                  15

                    </max-pool-size>

                      <prefill>

                        true  

                          </prefill>

                            <use-strict-min>

                              true  

                                </use-strict-min>

                                  </pool>

                                    </connection-definition>

                                    </connection-definitions>

                                    </resource-adapter>

                                    </resource-adapters>

                                    </subsystem>

              <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

              <subsystem xmlns="urn:jboss:domain:security:1.1">

                  <security-domains>

                      <security-domain name="other" cache-type="default">

                          <authentication>

                              <login-module code="Remoting" flag="optional">

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                              <login-module code="RealmUsersRoles" flag="required">

                                  <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                  <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                                  <module-option name="realm" value="ApplicationRealm"/>

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                          </authentication>

                      </security-domain>

                      <security-domain name="MySecurityDomainByFiles" cache-type="default">

                          <authentication>

                              <login-module code="UsersRoles" flag="required">

                                  <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                  <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                              </login-module>

                          </authentication>

                      </security-domain>

                      <security-domain name="jboss-web-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                      <security-domain name="jboss-ejb-policy" cache-type="default">

                          <authorization>

                              <policy-module code="Delegating" flag="required"/>

                          </authorization>

                      </security-domain>

                  </security-domains>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:threads:1.1"/>

              <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                  <core-environment>

                      <process-id>

                          <uuid/>

                      </process-id>

                  </core-environment>

                  <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                  <coordinator-environment default-timeout="300"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                  <virtual-server name="default-host" enable-welcome-root="true">

                      <alias name="localhost"/>

                      <alias name="example.com"/>

                  </virtual-server>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                  <modify-wsdl-address>true</modify-wsdl-address>

                  <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                  <endpoint-config name="Standard-Endpoint-Config"/>

                  <endpoint-config name="Recording-Endpoint-Config">

                      <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                          <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                      </pre-handler-chain>

                  </endpoint-config>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

       

       

       

       

       

       

          </profile>

       

          <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:192.168.1.115}"/>

              </interface>

              <interface name="public">

                  <any-ipv4-address/>

              </interface>

              <interface name="unsecure">

                  <inet-address value="${jboss.bind.address.unsecure:192.168.1.115}"/>

              </interface>

          </interfaces>

       

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

              <socket-binding name="ajp" port="8009"/>

              <socket-binding name="http" port="8080"/>

              <socket-binding name="https" port="8443"/>

              <socket-binding name="osgi-http" interface="management" port="8090"/>

              <socket-binding name="remoting" port="4447"/>

              <socket-binding name="txn-recovery-environment" port="4712"/>

              <socket-binding name="txn-status-manager" port="4713"/>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

          <deployments>

         

          </deployments>

      </server>