ENTAXY-480 release version 1.8.3

This commit is contained in:
2023-08-03 04:44:09 +03:00
parent 603889d627
commit 5844a2e5cf
2546 changed files with 11242 additions and 207556 deletions

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>management</artifactId>
<version>1.8.2.2</version>
<version>1.8.3</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.management</groupId>
@ -51,6 +49,11 @@
<artifactId>management-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.base.objects-base</groupId>
<artifactId>objects-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -61,5 +61,10 @@ public interface ConnectionMBean extends RuntimeTypedMBean {
* null for blended
*/
public String getBundleId();
/*
* connection label
*/
public String getLabel();
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -19,6 +19,12 @@
*/
package ru.entaxy.esb.platform.core.management.connection;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.esb.platform.base.management.core.api.Parameter;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATION_ENRICH)
public interface ConnectionsMBean {
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.connection";
@ -26,5 +32,9 @@ public interface ConnectionsMBean {
public static final String CONNECTIONS_KEY = "category";
public static final String CONNECTIONS_KEY_VALUE = "connections";
@Operation(desc = "Gets connection's configuration")
public String getConnectionConfig(
@Parameter(name = "connectionName", desc = "Connection name") String connectionName) throws Exception;
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -90,5 +90,10 @@ public class ConnectionMBeanImpl extends StandardMBean implements ConnectionMBea
public String getBundleId() {
return connection.getBundleId() + "";
}
@Override
public String getLabel() {
return connection.getLabel();
}
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,23 +26,21 @@ import java.util.Map;
import javax.management.DynamicMBean;
import javax.management.MBeanRegistration;
import javax.management.NotCompliantMBeanException;
import javax.management.StandardMBean;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.ServiceScope;
import org.osgi.service.component.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.base.management.core.ManagementCore;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.AnnotatedMBean;
import ru.entaxy.esb.platform.core.management.connection.ConnectionMBean;
import ru.entaxy.esb.platform.core.management.connection.ConnectionsMBean;
import ru.entaxy.esb.platform.core.management.connection.tracker.DeployedConnectionTracker;
import ru.entaxy.platform.base.objects.EntaxyObjectService;
@Component(
service = {ConnectionsMBean.class, DynamicMBean.class, MBeanRegistration.class},
@ -53,7 +51,7 @@ import ru.entaxy.esb.platform.core.management.connection.tracker.DeployedConnect
scope = ServiceScope.SINGLETON,
immediate = true
)
public class ConnectionsMBeanImpl extends StandardMBean
public class ConnectionsMBeanImpl extends AnnotatedMBean<ConnectionsMBean>
implements ConnectionsMBean, ManagedConnectionsListener {
private static final Logger log = LoggerFactory.getLogger(ConnectionsMBeanImpl.class);
@ -64,7 +62,10 @@ public class ConnectionsMBeanImpl extends StandardMBean
protected BundleContext bundleContext;
protected DeployedConnectionTracker tracker;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
EntaxyObjectService entaxyObjectService;
protected static class ManagedConnectionDescriptor {
ManagedConnection connection;
@ -124,4 +125,9 @@ public class ConnectionsMBeanImpl extends StandardMBean
}
}
}
@Override
public String getConnectionConfig(String connectionName) throws Exception {
return entaxyObjectService.findObject(connectionName, "entaxy.runtime.connection").getConfiguration();
}
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -27,6 +27,7 @@ public class ManagedConnection {
protected boolean isShared;
protected long bundleId;
protected boolean isDeployed;
protected String label;
public String getName() {
return name;
@ -46,6 +47,9 @@ public class ManagedConnection {
public boolean isDeployed() {
return isDeployed;
}
public String getLabel() {
return label;
}
public void setName(String name) {
this.name = name;
@ -65,6 +69,9 @@ public class ManagedConnection {
public void setDeployed(boolean isDeployed) {
this.isDeployed = isDeployed;
}
public void setLabel(String label) {
this.label = label;
}
public ManagedConnection name(String name) {
setName(name);
@ -95,4 +102,9 @@ public class ManagedConnection {
setDeployed(deployed);
return this;
}
public ManagedConnection label(String label) {
setLabel(label);
return this;
}
}

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,13 +65,16 @@ public class DeployedConnectionCustomizer implements BundleTrackerCustomizer<Man
continue;
val = capability.getAttributes().get("platform");
boolean isPlatform = val==null?false:"true".equals(val.toString());
val = capability.getAttributes().get("label");
String label = val == null ? "" : val.toString();
ManagedConnection mc = (new ManagedConnection())
.name(name)
.platform(isPlatform)
.deployed(true)
.local(isPlatform)
.shared(true)
.bundleId(bundle.getBundleId());
.bundleId(bundle.getBundleId())
.label(label);
result.managedConnections.add(mc);
}
listener.added(result);

View File

@ -2,7 +2,7 @@
* ~~~~~~licensing~~~~~~
* connection-management
* ==========
* Copyright (C) 2020 - 2021 EmDev LLC
* Copyright (C) 2020 - 2023 EmDev LLC
* ==========
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.