
OSGI-INF.blueprint.jdbc.xml Maven / Gradle / Ivy
<?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.0.0" default-activation="lazy"> <!-- Configuration Admin entries so the user can overwrite them if needed --> <cm:property-placeholder persistent-id="org.apache.james.jdbc"> <cm:default-properties> <cm:property name="jdbc.driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" /> <cm:property name="jdbc.url" value="jdbc:derby:/tmp/james;create=true" /> <cm:property name="jdbc.username" value="" /> <cm:property name="jdbc.password" value="" /> </cm:default-properties> </cm:property-placeholder> <!-- DataSource Derby --> <bean id="dataSourceJames" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <property name="testOnBorrow" value="${datasource.testOnBorrow:false}" /> <property name="validationQueryTimeout" value="${datasource.validationQueryTimeoutSec:-1}" /> <property name="validationQuery" value="${datasource.validationQuery:#{null}}" /> </bean> <service id="datasource" ref="dataSourceJames" interface="javax.sql.DataSource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/james"/> </service-properties> </service> </blueprint>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy