- change version on 1.8

- add docker-compose
- update entaxy
This commit is contained in:
2021-09-10 22:42:19 +03:00
parent 7d80bb81c6
commit 094a3fe67f
77 changed files with 2561 additions and 854 deletions

View File

@ -26,10 +26,38 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Initializer-Class>ru.entaxy.esb.platform.runtime.core.initializer.datasources.DataSourcesInitializer?id=datasources&amp;repeat=false</Entaxy-Initializer-Class>
<Entaxy-Initializer-Class>ru.entaxy.esb.platform.runtime.core.initializer.datasources.DataSourcesInitializer?id=datasources&amp;repeat=false&amp;retries=10&amp;interval=2000</Entaxy-Initializer-Class>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.cache.cfg</file>
<type>cfg</type>
<classifier>datasource-cache</classifier>
</artifact>
<artifact>
<file>src/main/non-packaged-resources/etc/org.ops4j.datasource-entaxy.esb.storage.cfg</file>
<type>cfg</type>
<classifier>datasource-storage</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -0,0 +1,43 @@
/*-
* ~~~~~~licensing~~~~~~
* datasources-initializer
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* ==========
* Licensed 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.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.runtime.core.initializer.datasources;
import javax.sql.DataSource;
public class DataSourcesCollector {
protected DataSource dsCache;
protected DataSource dsStorage;
protected void notifyOnComplete() {
if ((this.dsCache != null) && (this.dsStorage != null))
DataSourcesInitializer.collectorCompleted();
}
public void setDsCache(DataSource dsCache) {
this.dsCache = dsCache;
notifyOnComplete();
}
public void setDsStorage(DataSource dsStorage) {
this.dsStorage = dsStorage;
notifyOnComplete();
}
}

View File

@ -24,6 +24,7 @@ import org.osgi.framework.ServiceReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.runtime.core.initializer.api.AbstractInitializer;
import ru.entaxy.esb.platform.runtime.core.initializer.api.Initializer;
import ru.entaxy.esb.platform.runtime.core.initializer.api.InitializerException;
import javax.sql.DataSource;
@ -33,6 +34,13 @@ public class DataSourcesInitializer extends AbstractInitializer {
protected static final Logger log = LoggerFactory.getLogger(DataSourcesInitializer.class);
protected static Initializer.Callback callback = null;
public static void collectorCompleted() {
if (DataSourcesInitializer.callback != null)
DataSourcesInitializer.callback.inited(new DataSourcesInitializer());
}
@Override
public void init() throws InitializerException {
log.info("Init in DataSourcesInitializer is called");
@ -55,5 +63,8 @@ public class DataSourcesInitializer extends AbstractInitializer {
log.info("ReInit in CoreInitializer is called");
}
@Override
public void setCalllback(Callback callback) {
DataSourcesInitializer.callback = callback;
}
}

View File

@ -0,0 +1,29 @@
###
# ~~~~~~licensing~~~~~~
# datasources-initializer
# ==========
# Copyright (C) 2020 - 2021 EmDev LLC
# ==========
# Licensed 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.
# ~~~~~~/licensing~~~~~~
###
dataSourceName=entaxy.esb.cache
osgi.jdbc.driver.name=PostgreSQL JDBC Driver
serverName=localhost
portNumber=5432
databaseName=cache
user=entaxy
password=entaxy
pool=dbcp2
xa=true
jdbc.pool.maxTotal=100

View File

@ -0,0 +1,29 @@
###
# ~~~~~~licensing~~~~~~
# datasources-initializer
# ==========
# Copyright (C) 2020 - 2021 EmDev LLC
# ==========
# Licensed 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.
# ~~~~~~/licensing~~~~~~
###
dataSourceName=entaxy.esb.storage
osgi.jdbc.driver.name=PostgreSQL JDBC Driver
serverName=localhost
portNumber=5432
databaseName=esb_entaxy
user=entaxy
password=entaxy
pool=dbcp2
xa=true
jdbc.pool.maxTotal=100

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
datasources-initializer
==========
Copyright (C) 2020 - 2021 EmDev LLC
==========
Licensed 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.
~~~~~~/licensing~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<reference id="dsCache" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=entaxy.esb.cache)"
availability="mandatory"/>
<reference id="dsStorage" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=entaxy.esb.storage)"
availability="mandatory"/>
<bean id="collector" class="ru.entaxy.esb.platform.runtime.core.initializer.datasources.DataSourcesCollector"
activation="eager">
<property name="dsCache" ref="dsCache" />
<property name="dsStorage" ref="dsStorage" />
</bean>
</blueprint>