deployer and deploy config

47 views
Skip to first unread message

Wozza Xing

unread,
Mar 27, 2013, 3:53:19 AM3/27/13
to mobicent...@googlegroups.com
Hello,

I have a patch for the deployer so deploy-config.xml can go in the service du / or any du actually.

Should I raise issue & submit patch now or wait for AS7 deployer? If the AS7 deployer is not yet finished then can this
"feature" get in?

regards

Wozza
DeployableUnit.java.patch

Wozza Xing

unread,
Mar 27, 2013, 4:11:04 AM3/27/13
to mobicent...@googlegroups.com
While on the subject of deployers,

If there is an exception while creating the ra then the Mbean is not rolledback and subsequent deployments will fail
with the error failed to create and register entity resource usage mbean


18:59:55,938 ERROR [SLEESubDeployer]
javax.slee.SLEEException: hostname can't be null (my error)
at
org.mobicents.slee.container.management.ResourceManagementImpl.createResourceAdaptorEntity(ResourceManagementImpl.java:227)
at
org.mobicents.slee.container.deployment.jboss.action.CreateResourceAdaptorEntityAction.invoke(CreateResourceAdaptorEntityAction.java:52)
at org.mobicents.slee.container.deployment.jboss.DeploymentManager.sciAction(DeploymentManager.java:316)
at
org.mobicents.slee.container.deployment.jboss.DeploymentManager.installDeployableUnit(DeploymentManager.java:181)
at org.mobicents.slee.container.deployment.jboss.SLEESubDeployer.start(SLEESubDeployer.java:281)
at
org.mobicents.slee.container.deployment.jboss.SleeContainerDeployerImpl.start(SleeContainerDeployerImpl.java:268)
at org.mobicents.slee.container.deployment.jboss.SLEEDeployer.callSubDeployer(SLEEDeployer.java:124)
at org.mobicents.slee.container.deployment.jboss.SLEEDeployer.setInternalDeployer(SLEEDeployer.java:170)
at
org.mobicents.slee.container.deployment.jboss.SleeContainerDeployerImpl$1.run(SleeContainerDeployerImpl.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

19:07:22,912 ERROR [SLEESubDeployer]
javax.slee.SLEEException: failed to create and register entity resource usage mbean
at
org.mobicents.slee.container.management.ResourceManagementImpl.createResourceAdaptorEntity(ResourceManagementImpl.java:204)
at
org.mobicents.slee.container.deployment.jboss.action.CreateResourceAdaptorEntityAction.invoke(CreateResourceAdaptorEntityAction.java:52)
at org.mobicents.slee.container.deployment.jboss.DeploymentManager.sciAction(DeploymentManager.java:316)
at
org.mobicents.slee.container.deployment.jboss.DeploymentManager.installDeployableUnit(DeploymentManager.java:181)
at org.mobicents.slee.container.deployment.jboss.SLEESubDeployer.start(SLEESubDeployer.java:281)
at
org.mobicents.slee.container.deployment.jboss.SleeContainerDeployerImpl.start(SleeContainerDeployerImpl.java:268)
at org.mobicents.slee.container.deployment.jboss.SLEEDeployer.callSubDeployer(SLEEDeployer.java:124)
at org.mobicents.slee.container.deployment.jboss.SLEEDeployer.deploy(SLEEDeployer.java:98)
at org.mobicents.slee.container.deployment.jboss.SLEEDeployer.deploy(SLEEDeployer.java:46)
at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.slee.SLEEException: javax.slee.management.usage:type=ResourceUsage,raEntityName="Http Resource Adaptor
Entity" already registered.
at org.mobicents.slee.container.management.jmx.ResourceUsageMBeanImpl.<init>(ResourceUsageMBeanImpl.java:70)
at
org.mobicents.slee.container.management.UsageParametersManagementImpl.newResourceUsageMBean(UsageParametersManagementImpl.java:72)
at
org.mobicents.slee.container.management.ResourceManagementImpl.createResourceAdaptorEntity(ResourceManagementImpl.java:199)
... 36 more
Caused by: javax.management.InstanceAlreadyExistsException:
javax.slee.management.usage:type=ResourceUsage,raEntityName="Http Resource Adaptor Entity" already registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
at org.mobicents.slee.container.management.jmx.ResourceUsageMBeanImpl.<init>(ResourceUsageMBeanImpl.java:67)
> DeployableUnit.java.patch
>
>
> --- org/mobicents/slee/container/deployment/jboss/DeployableUnit.java 2010-12-28 04:28:10.000000000 +0100
> +++ src/main/java/org/mobicents/slee/container/deployment/jboss/DeployableUnit.java 2011-02-25 15:19:17.000000000 +0100
> @@ -52,9 +52,12 @@
> // A collection of the IDs of the components in this DU.
> private Collection<String> componentIDs = new ArrayList<String>();
>
> - // A collection of the IDs of the components that this DU depends on.
> + // A collection of the IDs of the components that this DU depends on.
> private Collection<String> dependencies = new ArrayList<String>();
>
> + // A collection of the IDs of the components that this DU depends on.
> + private Collection<String> deployDependencies = new ArrayList<String>();
> +
> // The install actions needed to install/activate this DU components.
> private Collection<Object[]> installActions = new ArrayList<Object[]>();
>
> @@ -116,13 +119,15 @@
> && postInstallActionsStrings.size() > 0) {
> installActions.addAll(postInstallActionsStrings);
> } else if (dc.getComponentType() == DeployableComponent.RA_COMPONENT) {
> +
> + /*
> ComponentID cid = dc.getComponentID();
>
> String raID = dc.getComponentKey();
>
> logger
> .warn("\r\n------------------------------------------------------------"
> - + "\r\nNo RA Entity and Link config for "
> + + "\r\nNo RA Entity **************** and Link config for "
> + raID
> + " found. Using default values!"
> + "\r\n------------------------------------------------------------");
> @@ -146,6 +151,8 @@
> "deactivateResourceAdaptorEntity", raName });
> uninstallActions.add(new Object[] { "removeResourceAdaptorEntity",
> raName });
> + *
> + */
> }
>
> // .. pre-uninstall actions (if any) ..
> @@ -175,6 +182,7 @@
> public Collection<String> getExternalDependencies() {
> // Take all dependencies...
> Collection<String> externalDependencies = new HashSet<String>(dependencies);
> + externalDependencies.addAll(deployDependencies);
>
> // Remove those which are contained in this DU
> externalDependencies.removeAll(componentIDs);
> @@ -271,7 +279,11 @@
> // Let's check if we have some remaining install actions
> if (postInstallActions.values().size() > 0) {
> for (String componentId : postInstallActions.keySet()) {
> - iActions.addAll(postInstallActions.get(componentId));
> + if (deployDependencies.contains(componentId)) {
> + iActions.addAll(0,postInstallActions.get(componentId));
> + } else {
> + iActions.addAll(postInstallActions.get(componentId));
> + }
> }
> }
>
> @@ -386,12 +398,14 @@
>
> // Get the JarEntry for the deploy-config.xml
> JarEntry deployInfoXML = componentJarFile.getJarEntry("META-INF/deploy-config.xml");
> + logger.info("Deployment Configuration Found");
>
> // If it exists, set an Input Stream on it
> is = deployInfoXML != null ? componentJarFile.getInputStream(deployInfoXML) : null;
>
> if (is != null) {
>
> + logger.info("Deployment Configuration Processing");
> // Read the file into a Document
> SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
> Schema schema = schemaFactory.newSchema(DeployableUnit.class.getClassLoader().getResource("deploy-config.xsd"));
> @@ -486,6 +500,9 @@
>
> for (int j = 0; j < links.getLength(); j++) {
> String linkName = ((Element) links.item(j)).getAttribute("name");
> + logger.info("Removing Dependency " + linkName);
> + componentIDs.add(linkName.trim());
> +
>
> cPostInstallActions.add(new Object[] {"bindLinkName", entityName, linkName});
>
> @@ -513,8 +530,10 @@
> else {
> preUninstallActions.put(raId, cPreUninstallActions);
> }
> + deployDependencies.add(raId);
> }
>
> +
> // Now we clean the lists for the next round (might come a new RA ID)...
> cPostInstallActions = new ArrayList<Object[]>();
> cPreUninstallActions = new ArrayList<Object[]>();
> @@ -523,7 +542,10 @@
>
> }
> }
> + } catch (Exception ex){
> + logger.info("Exception ",ex);
> }
> +
> finally {
> // Clean depoy-config.xml inputstream
> try {
>

Alexandre Mendonça

unread,
Mar 27, 2013, 8:27:38 PM3/27/13
to mobicent...@googlegroups.com
Hi Wozza,

How does this relates to https://code.google.com/p/mobicents/issues/detail?id=231 ? What exactly doesn't work for you?

Regards,

--
Alexandre Mendonça // JBoss R&D
http://ammendonca.blogspot.com/




Wozza

--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Wozza Xing

unread,
Mar 27, 2013, 9:33:51 PM3/27/13
to mobicent...@googlegroups.com
Hey is that's my patch, but the one in the email may be more recent as this is the one I'm using currently on
2.8-snapshot from git.

Problem description. RA entity not created when deploy-config.xml put in a du containing service.xml
Steps to reproduce the problem. Put the deploy-config.xml in the META-INF directory of the deployable unit.
Expected outcome. Ra entity is created and service is deployed.
Actual outcome. There is a problem about unresolvable dependencies.

Any ideas? Please assist.

On 03/28/2013 11:27 AM, Alexandre Mendonça wrote:
> Hi Wozza,
>
> How does this relates to
> https://code.google.com/p/mobicents/issues/detail?id=231 ? What exactly
> doesn't work for you?
>
> Regards,
>
> --
> *Alexandre Mendonça* // JBoss R&D
> http://ammendonca.blogspot.com/
>
>
> On Wed, Mar 27, 2013 at 7:53 AM, Wozza Xing <wozza...@gmail.com> wrote:
>
>> Hello,
>>
>> I have a patch for the deployer so deploy-config.xml can go in the service
>> du / or any du actually.
>>
>> Should I raise issue & submit patch now or wait for AS7 deployer? If the
>> AS7 deployer is not yet finished then can this "feature" get in?
>>
>> regards
>>
>> Wozza
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mobicents-public" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to mobicents-public+unsubscribe@**googlegroups.com<mobicents-public%2Bunsu...@googlegroups.com>
>> .
>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
>

Wozza Xing

unread,
Mar 27, 2013, 9:36:49 PM3/27/13
to mobicent...@googlegroups.com
There is also a bug when raActive throws runtime exception where the RA usage mbean is not rolledback out of deployment
so the next time the RA entity is created you get an error complaining that the usage mbean is already installed.

I imagine the mbeans server is not transactional?

Cheers thanks,

On 03/28/2013 11:27 AM, Alexandre Mendonça wrote:
> Hi Wozza,
>
> How does this relates to
> https://code.google.com/p/mobicents/issues/detail?id=231 ? What exactly
> doesn't work for you?
>
> Regards,
>
> --
> *Alexandre Mendonça* // JBoss R&D
> http://ammendonca.blogspot.com/
>
>
> On Wed, Mar 27, 2013 at 7:53 AM, Wozza Xing <wozza...@gmail.com> wrote:
>
>> Hello,
>>
>> I have a patch for the deployer so deploy-config.xml can go in the service
>> du / or any du actually.
>>
>> Should I raise issue & submit patch now or wait for AS7 deployer? If the
>> AS7 deployer is not yet finished then can this "feature" get in?
>>
>> regards
>>
>> Wozza
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mobicents-public" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to mobicents-public+unsubscribe@**googlegroups.com<mobicents-public%2Bunsu...@googlegroups.com>
>> .
>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
>

Alexandre Mendonça

unread,
Apr 26, 2013, 6:33:46 AM4/26/13
to Mobicents Public
Hi Wozza,

If you can please share a deployable-unit with the minimal needs to reproduce such problem, it would be easier to find what the problem is.

Thanks,
email to mobicents-public+unsubscribe@**googlegroups.com<mobicents-public%2Bunsubscribe@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Eduardo Martins

unread,
Apr 26, 2013, 1:05:07 PM4/26/13
to mobicent...@googlegroups.com
I'm a bit confused on the original topic, it's possible to bundle a deploy-config on any DU META-INF folder.

Wrt the issue on RA activation, please provide what Alex requested so we can assert the bug.

--E

To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages