ibm liberty server.xml config example

liberty jpa2.0 可以和jaxws jaxb 2.2 和平共处

liberty jpa2.1 就不行,不过项目里用的是hibernate 是不用他默认实现,直接不加载jpa组件。

<server description="new server">

<!-- Enable features -->

<featureManager>

<feature>jsp-2.2</feature>

<feature>jaxb-2.2</feature>

<feature>jdbc-4.0</feature>

<feature>servlet-3.0</feature>

<feature>jaxws-2.2</feature>

<feature>ejbLite-3.1</feature>

<feature>localConnector-1.0</feature>

</featureManager>

<!-- To access this server from a remote client add a host attribute to 

the following element, e.g. host="*" -->

<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

<jdbcDriver id="db2universal" libraryRef="db2Lib"/>

<library id="db2Lib">

        <fileset dir="${shared.resource.dir}/lib/db2" id="db2Fileset" includes="db2jcc.jar, db2jcc4.jar" caseSensitive="false"></fileset>

</library>

<dataSource id="regiedb" isolationLevel="TRANSACTION_READ_COMMITTED" jdbcDriverRef="db2universal" jndiName="jdbc/REGIEAPP" type="javax.sql.DataSource" transactional="true">

<connectionManager numConnectionsPerThreadLocal="10" id="ConnectionManager" minPoolSize="1"/>

<properties URL="" databaseName="" password="" portNumber="port" serverName="" user="" driverType="4"/>

    </dataSource>

<!-- Automatically expand WAR files and EAR files -->

<applicationManager autoExpand="true"/>

    <applicationMonitor updateTrigger="mbean"/>

    <enterpriseApplication id="com-icss-regie-inspcert-ear" location="com-icss-regie-inspcert-ear-1.0-SNAPSHOT.ear" name="com-icss-regie-inspcert-ear"/>

</server>

-----------------------------------------------------------

 <server description="new server">

    <!-- Enable features -->

    <featureManager>

        <feature>jaxrs-2.0</feature>

   <feature>localConnector-1.0</feature>

<feature>jaxws-2.2</feature>

<feature>jdbc-4.1</feature>

<feature>jndi-1.0</feature>

</featureManager>

    <httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

    <applicationManager autoExpand="true"/>

    <applicationMonitor updateTrigger="mbean"/>

    

    <jdbcDriver id="db2universal" libraryRef="db2Lib"/>

<library id="db2Lib">

        <fileset caseSensitive="false" dir="${shared.resource.dir}/lib/db2" id="db2Fileset" includes="db2jcc.jar, db2jcc4.jar"/>

</library>

<dataSource id="regiedb" isolationLevel="TRANSACTION_READ_COMMITTED" jdbcDriverRef="db2universal" jndiName="jdbc/REGIEAPP" transactional="true" type="javax.sql.DataSource">

<connectionManager id="ConnectionManager" minPoolSize="1" numConnectionsPerThreadLocal="10"/>

<properties URL="" databaseName="regiedb" driverType="4" password="" portNumber="" serverName="" user="/>

    </dataSource>

    <enterpriseApplication id="com-icss-regie-inspcert-ear" location="com-icss-regie-inspcert-ear-1.0-SNAPSHOT.ear" name="com-icss-regie-inspcert-ear"/>

</server>

------------------------------------------------------------------------------------------------------------------------

<server description="new server">

    <!-- Enable features -->

    <featureManager>

        <feature>jaxrs-2.0</feature>

   <feature>localConnector-1.0</feature>

<feature>jaxws-2.2</feature>

<feature>jdbc-4.1</feature>

<feature>jndi-1.0</feature>

</featureManager>

    <httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

    <applicationManager autoExpand="true"/>

    <applicationMonitor updateTrigger="mbean"/>

    

    <jdbcDriver id="db2universal" libraryRef="db2Lib"/>

<library id="db2Lib">

        <fileset caseSensitive="false" dir="${shared.resource.dir}/lib/db2" id="db2Fileset" includes="db2jcc.jar, db2jcc4.jar"/>

</library>

<dataSource id="regiedb" isolationLevel="TRANSACTION_READ_COMMITTED" jdbcDriverRef="db2universal" jndiName="jdbc/REGIEAPP" transactional="true" type="javax.sql.XADataSource">

<connectionManager id="ConnectionManager" minPoolSize="1" numConnectionsPerThreadLocal="10"/>

<propertie" databaseName="regiedb" driverType="4" password="password" portNumber="port" serverName="host" user="user"/>

    </dataSource>

<transaction recoverOnStartup="true" waitForRecovery="true" />

    <enterpriseApplication id="com-icss-regie-inspcert-ear" location="com-icss-regie-inspcert-ear-1.0-SNAPSHOT.ear" name="com-icss-regie-inspcert-ear"/>

</server>

猜你喜欢

转载自anole1982.iteye.com/blog/2325916