[JBoss JIRA] Created: (JBRULES-681) Multi-threaded local search solving
by Geoffrey De Smet (JIRA)
Multi-threaded local search solving
-----------------------------------
Key: JBRULES-681
URL: http://jira.jboss.com/jira/browse/JBRULES-681
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Solver
Reporter: Geoffrey De Smet
Assigned To: Geoffrey De Smet
Priority: Optional
Use Future's to spread all possible moves in each step over a number of threads.
This number of threads is equal to the number of cpu's by default, as no IO is done during solving.
Problems:
- each thread will needs it own WorkingMemory and during a step, each working memory will need to be updated
- a bunch of classes will need to be thread safe, or at least visibility save, such as bestsolutionrecaller.
- Barriers will be needed to collect the result of each step
- decks might be a great way to spread out the load
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (EJBTHREE-880) Hard-coded localhost in ejb3 test suite
by Aleksandar Kostadinov (JIRA)
Hard-coded localhost in ejb3 test suite
---------------------------------------
Key: EJBTHREE-880
URL: http://jira.jboss.com/jira/browse/EJBTHREE-880
Project: EJB 3.0
Issue Type: Bug
Reporter: Aleksandar Kostadinov
When the ejb3 testsuite is run with "-Dnode0=IP1 -Dnode1=IP2" and IP1!=localhost there are some tests failing with "Retries exceeded, couldn't reconnect to 127.0.0.1:####". I see this for 4_0 and 4_2 jboss branches, but guess it's the same with head.
One of the testcases is IiopRemoteUnitTestCase. I've checked ejb3/src/test/org/jboss/ejb3/test/iiop/unit/IiopRemoteUnitTestCase.java and there is 'props.put("java.naming.provider.url", "corbaloc::localhost:3528/NameService");'. Instead of localhost there should be used the node0 property. I guess the others have the same problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBREM-552) cannot init cause of ClassCastException
by John Mazzitelli (JIRA)
cannot init cause of ClassCastException
---------------------------------------
Key: JBREM-552
URL: http://jira.jboss.com/jira/browse/JBREM-552
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.Beta2 (Boon)
Reporter: John Mazzitelli
Assigned To: Tom Elrod
Priority: Minor
Fix For: 2.0.0.CR1 (Boon)
I'm in a catch clause within InvokerRegistry and I'm getting a weird exception thrown:
java.lang.IllegalStateException: Can't overwrite cause
at java.lang.Throwable.initCause(Throwable.java:320)
at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:447)
at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:324)
at org.jboss.remoting.Client.connect(Client.java:385)
at org.jboss.on.communications.command.client.JBossRemotingRemoteCommunicator.getRemotingClient(JBossRemotingRemoteCommunicator.java:470)
at org.jboss.on.communications.command.client.JBossRemotingRemoteCommunicator.send(JBossRemotingRemoteCommunicator.java:430)
at org.jboss.on.communications.command.client.AbstractCommandClient.invoke(AbstractCommandClient.java:167)
at org.jboss.on.communications.command.client.ClientCommandSender.send(ClientCommandSender.java:820)
at org.jboss.on.communications.command.client.ServerPollingThread.run(ServerPollingThread.java:102)
Look at line 447 and you'll see it is trying to init the cause of a ClassNotFoundException. Running in a debugger, the newly constructed exception created on 446 has a null cause. Looking then at Throwable.initCause and you'll see a null cause causes this IllegalStateException to be thrown. The cause needs to be "this", not null (I don't know why, seems like it should also look for null, but whatever - that's the way the JDK is written).
The fix is simple - use the constructor that takes a throwable as its second parameter. Not sure why initCause it being used, as opposed to this constructor.
e.g.:
new ClassNotFoundException("Can not invoke loadClientInvokerClass method on " + transportFactoryClass, e);
(notice the ", e" parameter).
There are three other instances where initCause is called on ClassNotFoundException that also need to be fixed. See the other catch clauses in here.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (JBREM-857) transporterclient not thread-safe for failover
by craig bordelon (JIRA)
transporterclient not thread-safe for failover
----------------------------------------------
Key: JBREM-857
URL: http://jira.jboss.com/jira/browse/JBREM-857
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: transporter
Affects Versions: 1.4.6.GA
Environment: solaris 10 and java 5
Reporter: craig bordelon
Fix For: 2.2.2.GA_CP02
the jboss 1.4.1 transporterclient used by multithreaded program was giving strange results on a clustered server when failing over so i found lack of synchronization in the code.
I made these changes and seems to be helping.
changes to TransporterClient.java.
I would like this fixed in the 2.x and 3.x versions (hello developers). I think i know how to fix the 2.x version of this code too as it has some new stuff but is likewise broken. (developers send me an email to bord(a)iscp.telcordia.com if you need it. thx
Craig)
@@ -93,11 +93,12 @@
/**
* Disconnects the remoting client
*/
- private void disconnect()
+ private synchronized void disconnect()
{
if(remotingClient != null)
{
remotingClient.disconnect();
+ remotingClient = null;
}
}
@@ -232,14 +233,18 @@
do
{
+ Client rcl = null;
+ synchronized(this) { rcl = remotingClient; }
+ if (rcl == null) throw new CannotConnectException("Client has been dis
connected.");
try
{
failOver = false;
- response = remotingClient.invoke(request);
+ response = rcl.invoke(request);
}
catch(CannotConnectException cnc)
{
- failOver = findAlternativeTarget();
+ failOver = findAlternativeTarget(rcl);
+ if (log.isDebugEnabled()) log.error("on CannotConnectException failO
ver is "+failOver+" for "+rcl.getInvoker().getLocator());
if(!failOver)
{
throw cnc;
@@ -264,7 +269,7 @@
*
* @return
*/
- private boolean findAlternativeTarget()
+ private boolean findAlternativeTarget(Client rcl)
{
boolean failover = false;
@@ -287,12 +292,19 @@
{
// finally found server with target handler
InvokerLocator newLocator = data.getInvokerLocator();
- if(!remotingClient.getInvoker().getLocator().equals(new
Locator))
+ if(!rcl.getInvoker().getLocator().equals(newLocator))
{
try
{
- remotingClient = new Client(newLocator);
- remotingClient.connect();
+ synchronized(this) {
+ if (rcl == remotingClient) {
+ disconnect();
+ remotingClient = new Client(newLocator);
+ }
+ //otherwise have to assume some other thread
+ //has meanwhile changed it
+ //including even disconnecting
+ }
return true;
}
catch(Exception e)
@@ -300,6 +312,8 @@
log.warn("Problem connecting to newly found alter
nate target.", e);
}
}
+ else if (log.isDebugEnabled())
+ log.error(rcl.getInvoker().getLocator()+" == "+newLoc
ator);
}
}
}
@@ -333,4 +347,4 @@
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] Created: (JBREM-808) Remove dependencies on ObjectNameFactory from JBoss JMX
by Julien Viet (JIRA)
Remove dependencies on ObjectNameFactory from JBoss JMX
-------------------------------------------------------
Key: JBREM-808
URL: http://jira.jboss.com/jira/browse/JBREM-808
Project: JBoss Remoting
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Julien Viet
It happens when my POJO has not been bound on the transporter server, it looks like the transporter client is trying to do some fail over.
This make JBoss Remoting depends on the JBoss JMX implementation. That makes JBoss Remoting more difficult to embed and reuse.
I think that the ObjectNameFactory class could be easily ported to JBoss Remoting without any harm done. However perhaps JBoss Remoting has more dependencies on JBoss JMX that I don't know that would prevent to remove such dependency.
[junit_] Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/mx/util/ObjectNameFactory
[junit_] at org.jboss.remoting.transporter.InternalTransporterServices.<clinit>(InternalTransporterServices.java:41)
[junit_] at org.jboss.remoting.transporter.TransporterClient.findAlternativeTarget(TransporterClient.java:330)
[junit_] at org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:301)
[junit_] at $Proxy0.getInfo(Unknown Source)
[junit_] at org.jboss.portal.test.framework.driver.remote.RemoteTestDriverClient.getInfo(RemoteTestDriverClient.java:107)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month