Skip to content

Commit

Permalink
smsc wildfly compatibility changes
Browse files Browse the repository at this point in the history
Conflicts:
	service/wildfly/modules/pom.xml
	service/wildfly/modules/src/main/module/module.xml
  • Loading branch information
anatolysatanovskiy-mobius authored and vetss committed Nov 21, 2017
1 parent faa3e00 commit e51f033
Show file tree
Hide file tree
Showing 12 changed files with 275 additions and 62 deletions.
7 changes: 6 additions & 1 deletion release/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@
<include name="**"/>
</fileset>
</copy>

<copy todir="${restcomm.jss7.dist}/ss7-wildfly/restcomm-ss7-service/commons" failonerror="true">
<fileset dir="${jss7.dir}/service/wildfly/commons/target/module">
<include name="**"/>
</fileset>
</copy>

<echo>Copy OAM ui</echo>
<copy todir="${restcomm.jss7.dist}/oam/new-ui" failonerror="true">
<fileset dir="${jss7.dir}/oam/new-ui/target/">
Expand Down
18 changes: 15 additions & 3 deletions release/release-build-wildfly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<!-- adding of ss7 subsystem into standalone.xml -->
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][@reflection]]"/>
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.restcomm:ss7-wildfly:1.0'][@reflection]]"/>
<insert path="/:server/:profile/*[local-name()='subsystem'][last()]" position="after" file="template/wildfly-jss7-subsystem.txt"></insert>
</xmltask>

Expand Down Expand Up @@ -120,7 +120,7 @@
</xmltask>

<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][@reflection]]"/>
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.restcomm:ss7-wildfly:1.0'][@reflection]]"/>
</xmltask>

<delete dir="${restcomm-ss7.path}" />
Expand Down Expand Up @@ -154,5 +154,17 @@
<delete file="${jboss.standalone.path}/configuration/jmx-roles.properties" />
<delete file="${jboss.standalone.path}/configuration/jmx-users.properties" />
</target>


<target name="deploy-commons">
<copy overwrite="true" todir="${restcomm-ss7.path}/commons">
<fileset dir="${basedir}/restcomm-ss7-service/commons">
<include name="*/**" />
</fileset>
</copy>
</target>

<target name="undeploy-commons">
<delete dir="${restcomm-ss7.path}/commons" />
</target>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.mobicents.ss7.service.SS7ExtensionService;
import org.mobicents.ss7.service.SS7ServiceInterface;

import javax.management.MBeanServer;
import java.util.List;
Expand Down Expand Up @@ -51,7 +52,7 @@ public void performBoottime(OperationContext context, ModelNode operation, Model
service.setModel(fullModel);

ServiceName name = SS7ExtensionService.getServiceName();
ServiceController<SS7ExtensionService> controller = context.getServiceTarget()
ServiceController<SS7ServiceInterface> controller = context.getServiceTarget()
.addService(name, service)
.addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
.addDependency(MBeanServerService.SERVICE_NAME, MBeanServer.class, service.getMbeanServer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
* @author sergey vetyutnev
*
*/
public class SS7ExtensionService implements Service<SS7ExtensionService> {
public class SS7ExtensionService implements SS7ServiceInterface,Service<SS7ServiceInterface> {

// //
public static final SS7ExtensionService INSTANCE = new SS7ExtensionService();
Expand Down Expand Up @@ -216,25 +216,27 @@ public void start(StartContext context) throws StartException {
}

createPayloadParts(dataDir);

shellExecutorMBean = null;
try {
FastList<ShellExecutor> shellExecutors = new FastList<ShellExecutor>();
shellExecutors.add(beanSccpExecutor);
shellExecutors.add(beanM3uaShellExecutor);
shellExecutors.add(beanSctpShellExecutor);
shellExecutors.add(beanTcapExecutor);

String address = getPropertyString("ShellExecutor", "address", "127.0.0.1");
int port = getPropertyInt("ShellExecutor", "port", 3435);
String securityDomain = getPropertyString("ShellExecutor", "securityDomain", "jmx-console");

shellExecutorMBean = new ShellServerWildFly(schedulerMBean, shellExecutors);
shellExecutorMBean.setAddress(address);
shellExecutorMBean.setPort(port);
shellExecutorMBean.setSecurityDomain(securityDomain);
} catch (Exception e) {
throw new StartException("ShellExecutor MBean creating is failed: " + e.getMessage(), e);
System.out.println("SS7 shellExecutorExists():" + shellExecutorExists());
if(shellExecutorExists()) {
shellExecutorMBean = null;
try {
FastList<ShellExecutor> shellExecutors = new FastList<ShellExecutor>();
shellExecutors.add(beanSccpExecutor);
shellExecutors.add(beanM3uaShellExecutor);
shellExecutors.add(beanSctpShellExecutor);
shellExecutors.add(beanTcapExecutor);

String address = getPropertyString("ShellExecutor", "address", "127.0.0.1");
int port = getPropertyInt("ShellExecutor", "port", 3435);
String securityDomain = getPropertyString("ShellExecutor", "securityDomain", "jmx-console");

shellExecutorMBean = new ShellServerWildFly(schedulerMBean, shellExecutors);
shellExecutorMBean.setAddress(address);
shellExecutorMBean.setPort(port);
shellExecutorMBean.setSecurityDomain(securityDomain);
} catch (Exception e) {
throw new StartException("ShellExecutor MBean creating is failed: " + e.getMessage(), e);
}
}

// Ss7Management
Expand Down Expand Up @@ -406,7 +408,9 @@ public void start(StartContext context) throws StartException {

// Starting of general beans
try {
shellExecutorMBean.start();
if(shellExecutorMBean != null) {
shellExecutorMBean.start();
}
ss7ManagementMBean.start();
restcommAlarmManagementMBean.start();
restcommStatisticManagementMBean.start();
Expand Down Expand Up @@ -475,6 +479,11 @@ public void start(StartContext context) throws StartException {
}
}

private boolean shellExecutorExists() {
ModelNode shellExecutorNode = peek(fullModel, "mbean", "ShellExecutor");
return shellExecutorNode != null;
}

@Override
public void stop(StopContext context) {
log.info("Stopping SS7ExtensionService");
Expand Down Expand Up @@ -1273,4 +1282,28 @@ private void createCapService(ModelNode serviceNode, String beanName, String dat
}
}

@Override
public ShellExecutor getBeanSctpShellExecutor() {
return beanSctpShellExecutor;
}

@Override
public ShellExecutor getBeanM3uaShellExecutor() {
return beanM3uaShellExecutor;
}

@Override
public ShellExecutor getBeanSccpExecutor() {
return beanSccpExecutor;
}

@Override
public ShellExecutor getBeanTcapExecutor() {
return beanTcapExecutor;
}

@Override
public Ss7Management getSs7Management() {
return ss7ManagementMBean;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.mobicents.ss7.service;

import org.mobicents.protocols.ss7.oam.common.jmxss7.Ss7Management;
import org.mobicents.ss7.management.console.ShellExecutor;

public interface SS7ServiceInterface {
ShellExecutor getBeanSctpShellExecutor();

ShellExecutor getBeanM3uaShellExecutor();

ShellExecutor getBeanSccpExecutor();

ShellExecutor getBeanTcapExecutor();

Ss7Management getSs7Management();
}
3 changes: 2 additions & 1 deletion service/wildfly/extension/src/main/module/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
<module name="org.jboss.logging"/>

<module name="org.mobicents.ss7.modules"/>
<module name="org.mobicents.ss7.commons"/>
</dependencies>
</module>
</module>
58 changes: 30 additions & 28 deletions service/wildfly/modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<enableAssertions>true</enableAssertions>
<argLine>-Xmx512m</argLine>
<systemProperties>
<property>
<name>jboss.home</name>
<value>${jboss.home}</value>
</property>
</systemProperties>
<includes>
<include>**/*TestCase.java</include>
</includes>
<forkMode>once</forkMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -47,16 +75,13 @@

<dependencies>
<!-- 3rd PARTY -->
<dependency>
<groupId>javolution</groupId>
<artifactId>javolution</artifactId>
<version>${javolution.version}</version>
</dependency>
<!--
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
</dependency>
-->
<dependency>
<groupId>org.mobicents.protocols.stream</groupId>
<artifactId>stream</artifactId>
Expand All @@ -74,13 +99,6 @@
<artifactId>congestion</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Scheduler -->
<dependency>
<groupId>org.mobicents.protocols.ss7.scheduler</groupId>
<artifactId>scheduler</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Clock -->

<!-- Service -->
<dependency>
Expand All @@ -89,29 +107,13 @@
<version>${project.version}</version>
</dependency>

<!-- Management Shell -->
<dependency>
<groupId>org.mobicents.protocols.ss7.management</groupId>
<artifactId>shell-transport</artifactId>
<version>${project.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.mobicents.protocols.ss7.management</groupId>
<artifactId>shell-client</artifactId>
<version>${project.version}</version>
</dependency>
-->
<dependency>
<groupId>org.mobicents.protocols.ss7.management</groupId>
<artifactId>shell-server-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mobicents.protocols.ss7.management</groupId>
<artifactId>shell-server-impl</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Management linkset -->
<dependency>
Expand Down
11 changes: 4 additions & 7 deletions service/wildfly/modules/src/main/module/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<module xmlns="urn:jboss:module:1.3" name="${module.name}">

<resources>
<resource-root path="javolution-${javolution.version}.jar"/>
<!--
<resource-root path="netty-all-${netty.version}.jar"/>
-->
<resource-root path="stream-${stream.version}.jar"/>
<resource-root path="commons-email-1.3.2.jar"/>

<resource-root path="congestion-${project.version}.jar"/>
<resource-root path="scheduler-${project.version}.jar"/>
<resource-root path="statistics-api-${project.version}.jar"/>
<resource-root path="statistics-impl-${project.version}.jar"/>

Expand Down Expand Up @@ -38,9 +38,6 @@

<resource-root path="restcomm-ss7-${project.version}.jar"/>

<resource-root path="shell-server-api-${project.version}.jar"/>
<resource-root path="shell-server-impl-${project.version}.jar"/>
<resource-root path="shell-transport-${project.version}.jar"/>
<resource-root path="linkset-${project.version}.jar"/>

<resource-root path="jmx-${project.version}.jar"/>
Expand Down Expand Up @@ -76,7 +73,7 @@
<module name="org.jboss.msc"/>
<module name="org.jboss.jts"/>
<module name="org.jboss.logging"/>

<module name="org.mobicents.ss7.commons"/>
<!-- lic dep -->
</dependencies>
</module>
</module>
1 change: 1 addition & 0 deletions service/wildfly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<modules>
<module>modules</module>
<module>extension</module>
<module>restcomm-ss7-wildfly-commons</module>
</modules>

</project>
Loading

0 comments on commit e51f033

Please sign in to comment.