[JBoss JIRA] Created: (EJBTHREE-1500) Discrepancies between removing a bean in cache vs bean passivated
by Galder Zamarreno (JIRA)
Discrepancies between removing a bean in cache vs bean passivated
-----------------------------------------------------------------
Key: EJBTHREE-1500
URL: https://jira.jboss.org/jira/browse/EJBTHREE-1500
Project: EJB 3.0
Issue Type: Sub-task
Affects Versions: AS 4.2.3.GA, AS 5.0.0.CR1
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
There's a discrepancy between removing a bean from the cache
after a timeout when bean is in cache compared to when bean is
passivated:
Example, when bean is in cache and has to be removed, this is called:
if (now - centry.lastUsed >= removalTimeout * 1000)
{
synchronized (centry)
{
it.remove();
}
}
Now, when bean is passivated, this is called:
if (now - centry.lastUsed >= removalTimeout * 1000)
{
get(centry.getId(), false);
remove(centry.getId());
}
And remove() method calls:
if(log.isTraceEnabled())
{
log.trace("Removing context " + key);
}
StatefulBeanContext ctx = null;
synchronized (cacheMap)
{
ctx = (StatefulBeanContext) cacheMap.get(key);
}
if(ctx == null)
throw new NoSuchEJBException("Could not find Stateful bean: " + key);
if (!ctx.isRemoved())
container.destroy(ctx);
++removeCount;
if (ctx.getCanRemoveFromCache())
{
synchronized (cacheMap)
{
cacheMap.remove(key);
}
}
What this means is that when a bean in cache is removed:
1.- removeCount is not updated
2.- container.destroy(ctx); is not executed and hence the @Remove
method is not executed either.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBRULES-2875) Exception executing predicate with binding variable and or predicate
by alexandre alexandre (JIRA)
Exception executing predicate with binding variable and or predicate
--------------------------------------------------------------------
Key: JBRULES-2875
URL: https://issues.jboss.org/browse/JBRULES-2875
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.1.1.FINAL
Environment: Windows XP / DEBIAN / Eclipse 3.5.1
Reporter: alexandre alexandre
Assignee: Mark Proctor
Priority: Critical
Exception executing predicate with binding variable and or predicate
When I execute this kind of rule :
(where field id from Object Entity is an Integer.)
rule "test"
salience 20
when
(String() or Double())
$entity:Entity()
DroolsTest(entity.id == $entity.id )
then
System.out.println( "it works !" );
end
I got this exception :
Exception in thread "main" org.drools.RuntimeDroolsException: Exception executing predicate entite.id == $entite.id
at org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:302)
at org.drools.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:142)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:83)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:64)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:85)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:138)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:148)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1174)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1123)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
at com.agysoft.marco.tools.tuOneShot.marcometier.drools.DroolsTest.main(DroolsTest.java:57)
Caused by: [Error: unable to resolve method: java.lang.String.id() [arglength=0]]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:932)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:592)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:311)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:137)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:137)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:111)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:104)
at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:91)
at org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:295)
... 16 more
this rule Works :
rule "test"
salience 20
when
$entity:Entity()
DroolsTest(entity.id == $entity.id )
then
System.out.println( "it works !" );
end
this rule Works :
rule "test"
salience 20
when
(String() or Double())
$entity:Entity()
DroolsTest(entity.id == $entity.id )
then
System.out.println( "it works !" );
end
---------------------------------------------------------------------------------------------------
variant case with another Exception :
rule "test"
salience 20
when
(String() or Double())
Entite($entiteId:id)
DroolsTest(entite.id == $entiteId )
then
System.out.println( "it works !" );
end
throw this Exception Stack :
Exception in thread "main" org.drools.RuntimeDroolsException: Exception executing predicate entite.id == $entiteId
at org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:302)
at org.drools.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:142)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:83)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:64)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:85)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:138)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:148)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1174)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1123)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
at com.agysoft.marco.tools.tuOneShot.marcometier.drools.DroolsTest.main(DroolsTest.java:57)
Caused by: [Error: java.lang.String cannot be cast to com.agysoft.marco.tools.tuOneShot.marcometier.drools.Entite]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0]
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:387)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:137)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:137)
at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:111)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:104)
at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:91)
at org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:295)
... 16 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to com.agysoft.marco.tools.tuOneShot.marcometier.drools.Entite
at org.drools.base.com.agysoft.marco.tools.tuOneShot.marcometier.drools.Entite4694228$getId.getIntValue(Unknown Source)
at org.drools.base.extractors.BaseIntClassFieldReader.getValue(BaseIntClassFieldReader.java:52)
at org.drools.base.ClassFieldReader.getValue(ClassFieldReader.java:91)
at org.drools.rule.Declaration.getValue(Declaration.java:228)
at org.drools.base.mvel.DroolsMVELPreviousDeclarationVariable.getValue(DroolsMVELPreviousDeclarationVariable.java:83)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:454)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:311)
... 24 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBLOGGING-45) Support automatic log file compression in FileHandler (for compressing all files in real time) and PeriodicRotatingFileHandler (for compressing upon rotation)
by Aleksander Adamowski (JIRA)
Support automatic log file compression in FileHandler (for compressing all files in real time) and PeriodicRotatingFileHandler (for compressing upon rotation)
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBLOGGING-45
URL: https://jira.jboss.org/jira/browse/JBLOGGING-45
Project: JBoss Logging
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Aleksander Adamowski
Assignee: David Lloyd
This is a follow up to JBAS-6917.
It would be nice to have an automatic compression of log files similar to the one implemented in Log4j extras:
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4...
"TimeBasedRollingPolicy supports automatic file compression. This feature is enabled if the value of the FileNamePattern option ends with .gz or .zip."
In JBoss Logging, I suppose this could be implemented on 2 levels:
1) In the FileHandler (http://anonsvn.jboss.org/repos/common/jboss-logmanager/trunk/src/main/jav...) so that, with proper configuration, each log file is compressed in real time, and it exists only in compressed form from the moment of its creation.
2) In the PeriodicRotatingFileHandler (http://anonsvn.jboss.org/repos/common/jboss-logmanager/trunk/src/main/jav...) so that with proper configuration, archival log files can be compressed the moment they are rotated (e.g. server.log.2010-05-06.gz is created instead of server.log.2010-05-06), but the current log file should be plain text.
In PeriodicRotatingFileHandler, the implementation must take into account that compression of rotated log files may take considerable time and should be performed in the background - the handler should be able to process log records at any time, particularly during rotation, without losing any.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBWEB-72) html page and jsp are not display with in a Context defined in server.xml.
by Jean-Frederic Clere (JIRA)
html page and jsp are not display with in a Context defined in server.xml.
--------------------------------------------------------------------------
Key: JBWEB-72
URL: http://jira.jboss.com/jira/browse/JBWEB-72
Project: JBoss Web
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core
Affects Versions: JBoss Web Server 1.0.1 GA
Environment: any
Reporter: Jean-Frederic Clere
Assigned To: Jean-Frederic Clere
Priority: Minor
When using a Context definition in server.xml like:
<Context path="/test" docBase="/home/jfclere/TMP/MYAPP" />
The jsp and html pages of /home/jfclere/TMP/MYAPP are not displayed (404 is returned).
That is because the conf/web.xml is not used to set the defaults when the <Context/> is processed.
DefaultWebXml is set in TomcatDeployer and that is after the <Context/> needs it. The default value is used but it is set to "web.xml".
--
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
14 years
[JBoss JIRA] Created: (JBRULES-2934) CommandFactory newStartProcess doesn't set parameters
by Dan Seaver (JIRA)
CommandFactory newStartProcess doesn't set parameters
-----------------------------------------------------
Key: JBRULES-2934
URL: https://issues.jboss.org/browse/JBRULES-2934
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.2.0.M1
Reporter: Dan Seaver
Assignee: Mark Proctor
Should be able to set parameter values when starting a process. Current code:
public static Command newStartProcess(String processId,
Map<String, Object> parameters) {
return getCommandFactoryProvider().newStartProcess( processId );
}
proposed code:
public static Command newStartProcess(String processId,
Map<String, Object> parameters) {
StartProcessCommand cmd = new StartProcessCommand(processId);
cmd.setParameters(parameters);
return cmd;
}
Also, I think this issue would go under the droolsjbpm-knowledge component if the JIRA component list were updated.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[JBoss JIRA] Created: (JBRULES-2533) Update Eclipse Compiler dependency
by Fabian Lange (JIRA)
Update Eclipse Compiler dependency
----------------------------------
Key: JBRULES-2533
URL: https://jira.jboss.org/browse/JBRULES-2533
Project: Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.1.0.M2
Reporter: Fabian Lange
Assignee: Mark Proctor
drools-compiler pom includes a reference to eclipse JDT. in 5.0.1 this was a 4 MB core_whatever.jar
Because I wanted to improve compiler performance I tried out a never eclipse compiler package. Finding it was not very easy, because eclipse seems to change group and artifact ids every day.
I found a module which only contains the compiler part from eclipse 3.5.1, which works in all my tests ok.
Another nice benefit was that the size of my war shrunk by 3 Megabytes, as this module is only 1.7 megs.
It even helped for performance of compilation process by the way. Not that this is a main bottleneck, but we have files that take seconds to compile.
My tests on my windows box with java 6 gave 5-10% improvement using the 3.5.1 jdt compiler.
Here the part for the pom:
{code}
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>3.5.1</version>
</dependency>
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years