[JBoss Messaging Development] - SpyJMSException
by Viswanath Nekkanti
Viswanath Nekkanti [http://community.jboss.org/people/vnekkanti.09] created the discussion
"SpyJMSException"
To view the discussion, visit: http://community.jboss.org/message/534878#534878
--------------------------------------------------------------
We are using JBOSS 4.0.0. RC1. The in-built feature of messaging, which is JBOSS MQ is being used to send messages. Frequently, we are encountered with the following exception while trying to transmit messages to n number of destinations.
org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable: (java.io.IOException: ping timeout.)
at org.jboss.mq.Connection.asynchFailure(Connection.java:436)
at org.jboss.mq.Connection$PingTask.run(Connection.java:1385)
at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.IOException: ping timeout.
at org.jboss.mq.Connection$PingTask.run(Connection.java:1377)
Any suggestions?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534878#534878]
Start a new discussion in JBoss Messaging Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Microcontainer Development] - setRequiredStage should also setRequiredState
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] created the discussion
"setRequiredStage should also setRequiredState"
To view the discussion, visit: http://community.jboss.org/message/534876#534876
--------------------------------------------------------------
This patch in OSGi shows that there is something wrong with AbstractDeploymentContext.setRequiredStage().
You shouldn't have to explicitly do the ControllerContext.setRequiredState(), that is an implementation detail.
Index: PackageAdminImpl.java
===================================================================
--- PackageAdminImpl.java (revision 103305)
+++ PackageAdminImpl.java (working copy)
@@ -347,6 +347,18 @@
{
log.error("Error resolving bundles: " + resolvableBundles, ex);
allResolved = false;
+
+ // Reset the required state for bundles that didn't get resolved
+ for (OSGiBundleState bundleState : resolvableBundles)
+ {
+ if (bundleState.getState() == Bundle.INSTALLED)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ unit.setRequiredStage(DeploymentStages.DESCRIBE);
+ ControllerContext ctx = unit.getAttachment(ControllerContext.class);
+ ctx.setRequiredState(ControllerState.newState(DeploymentStages.DESCRIBE.getName()));
+ }
+ }
}
return allResolved;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534876#534876]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
Re: [jboss-dev-forums] [JBoss Microcontainer Development] - On demand resolution
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] replied to the discussion
"On demand resolution"
To view the discussion, visit: http://community.jboss.org/message/534874#534874
--------------------------------------------------------------
This patch resolves the issue. It was only resetting the state if DeployerClient.change() threw a DeploymentException,
while in this case, there's no exception it is just incomplete.
core/src/main/java/org/jboss/osgi/framework/packageadmin
$ svn diff
Index: PackageAdminImpl.java
===================================================================
--- PackageAdminImpl.java (revision 103305)
+++ PackageAdminImpl.java (working copy)
@@ -347,6 +347,18 @@
{
log.error("Error resolving bundles: " + resolvableBundles, ex);
allResolved = false;
+
+ // Reset the required state for bundles that didn't get resolved
+ for (OSGiBundleState bundleState : resolvableBundles)
+ {
+ if (bundleState.getState() == Bundle.INSTALLED)
+ {
+ DeploymentUnit unit = bundleState.getDeploymentUnit();
+ unit.setRequiredStage(DeploymentStages.DESCRIBE);
+ ControllerContext ctx = unit.getAttachment(ControllerContext.class);
+ ctx.setRequiredState(ControllerState.newState(DeploymentStages.DESCRIBE.getName()));
+ }
+ }
}
return allResolved;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534874#534874]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
Re: [jboss-dev-forums] [JBoss Microcontainer Development] - On demand resolution
by Thomas Diesler
Thomas Diesler [http://community.jboss.org/people/thomas.diesler%40jboss.com] replied to the discussion
"On demand resolution"
To view the discussion, visit: http://community.jboss.org/message/534827#534827
--------------------------------------------------------------
This http://fisheye.jboss.org/changelog/JBossOSGi/projects/runtime/framework/t... change causes http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-git-staging/22/testReport/ regression in bundle lifecycle handling. I added test coverage for this in the framework's http://fisheye.jboss.org/browse/JBossOSGi/projects/runtime/framework/trun... BundleLifecycleTestCase
The issue is that a bundle may automatically progress to state RESOLVED after it gets installed . The expected behaviour is that a bundle stays in state INSTALLED until the first class load triggers a state change to RESOLVED. It is important that bundles do not get resolved one-by-one as they get installed because this may lead to undesired wirings. i.e. the resolver might no be able to correctly wire a set of bundles together
Consider, bundle B imports a package from bundle X. B gets installed. Starting B fails because of the the unresolved constraint. Later X gets installed and is expected to be in state INSTALLED. Currently, X progesses unexpectedly to state RESOLVED.
Bundle bundleB = installBundle(assembleArchive("lifecycle-bundleB", "/bundles/lifecycle/bundleB", ActivatorB.class, ServiceB.class));
assertBundleState(Bundle.INSTALLED, bundleB.getState());
try
{
bundleB.start();
fail("Unresolved constraint expected");
}
catch (BundleException ex)
{
// expected
}
Bundle bundleX = installBundle(assembleArchive("lifecycle-bundleX", "/bundles/lifecycle/bundleX", X.class));
System.out.println("FIXME [JBDEPLOY-245] Unexpected dependee state changes");
//assertBundleState(Bundle.INSTALLED, bundleX.getState());
http://fisheye.jboss.org/browse/JBossOSGi/projects/runtime/framework/trun... http://fisheye.jboss.org/browse/JBossOSGi/projects/runtime/framework/trun...
I still need to look into the details of why this would happen.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/534827#534827]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years