Skip to content

Instantly share code, notes, and snippets.

@aaronwalker
Created May 2, 2013 12:41
Show Gist options
  • Select an option

  • Save aaronwalker/5501940 to your computer and use it in GitHub Desktop.

Select an option

Save aaronwalker/5501940 to your computer and use it in GitHub Desktop.
<?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.
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
">
<!-- blueprint property placeholders -->
<cm:property-placeholder persistent-id="org.jentrata.ebms.jdbc" update-strategy="reload">
<cm:default-properties>
<cm:property name="jentrata.messagestore.type" value="postgres"/>
<cm:property name="jentrata.messagestore.jdbc.driverClass" value="org.postgresql.Driver"/>
<cm:property name="jentrata.messagestore.jdbc.url" value="jdbc:postgresql://localhost/jentrata-message-store"/>
<cm:property name="jentrata.messagestore.jdbc.username" value="jentrata"/>
<cm:property name="jentrata.messagestore.jdbc.password" value="jentrata"/>
<cm:property name="jentrata.messagestore.autoCreateTables" value="true"/>
</cm:default-properties>
</cm:property-placeholder>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jentrata.messagestore.jdbc.driverClass}"/>
<property name="url" value="${jentrata.messagestore.jdbc.url}"/>
<property name="username" value="${jentrata.messagestore.jdbc.username}"/>
<property name="password" value="${jentrata.messagestore.jdbc.password}"/>
</bean>
<bean id="repositoryManagerFactory" class="org.jentrata.ebms.messaging.internal.sql.RepositoryManagerFactory">
<property name="dataSource" ref="dataSource"/>
<property name="databaseType" value="${jentrata.messagestore.type}"/>
</bean>
<bean id="repositoryManager" factory-ref="repositoryManagerFactory" factory-method="createRepositoryManager" />
<bean id="messageStore" class="org.jentrata.ebms.messaging.internal.JDBCMessageStore" init-method="init">
<property name="repositoryManager" ref="repositoryManager"/>
<property name="createTables" value="${jentrata.messagestore.autoCreateTables}"/>
</bean>
<service ref="messageStore" interface="org.jentrata.ebms.messaging.MessageStore" ranking="5"/>
</blueprint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment