[JBoss JIRA] Created: (JBCACHE-883) VersionAwareMarshaller hides true cause of marshalling failures
by Brian Stansberry (JIRA)
VersionAwareMarshaller hides true cause of marshalling failures
---------------------------------------------------------------
Key: JBCACHE-883
URL: http://jira.jboss.com/jira/browse/JBCACHE-883
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.4.0.SP1, 1.4.0.GA
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Priority: Minor
Fix For: 1.4.1.GA
>From objectFromByteBuffer:
try
{
return marshaller.objectFromStream(in);
}
catch (Exception e)
{
if (marshaller instanceof LegacyTreeCacheMarshaller)
{
// the default marshaller IS the legacy marshaller!!
throw e;
}
else
{
// retry with legacy marshaller - this is probably because the version id was incorrectly read.
if (log.isInfoEnabled())
{
log.info("Caught exception unmarshalling stream with specific versioned marshaller " + marshaller.getClass() + ". Attempting to try again with legacy marshaller " + LegacyTreeCacheMarshaller.class);
}
// create a more 'compatible' ObjectInputStream.
in = new MarshalledValueInputStream(new ByteArrayInputStream(buf));
return getMarshaller(VERSION_LEGACY).objectFromStream(in);
}
}
Problem is the else block in the catch block, which assumes the LegacyTreeCacheMarshaller will work. There should be a try/catch there as well, and if the assumption is wrong and there is a failure with the LegacyTreeCacheMarshaller as well, the original exception should be thrown.
--
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
19 years, 8 months
[JBoss JIRA] Created: (JBCACHE-881) get() and remove() calls on non-existent nodes create intermediate nodes before returning a null
by Manik Surtani (JIRA)
get() and remove() calls on non-existent nodes create intermediate nodes before returning a null
------------------------------------------------------------------------------------------------
Key: JBCACHE-881
URL: http://jira.jboss.com/jira/browse/JBCACHE-881
Project: JBoss Cache
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.4.0.SP1, 1.3.0.SP3
Reporter: Manik Surtani
Assigned To: Manik Surtani
Fix For: 1.3.0.SP4, 1.4.1.GA, 2.0.0.ALPHA2, 2.0.0.GA
Applies to the pessimistic lock interceptor only.
"When doing a get on a node that doesn't exist, intermediate nodes are created. E.g., cache2.get("/one/two/three", "key1") actually ends up creating /one/two/three first, and after the JBCACHE-875 fix, /, /one and /one/two will be WL'd for a get() on a nonexistent node!! Shouldn't the loop just be short-circuited such that at any point, if the next node does not exist and the lock_type requested is READ, just return a null? Saves us a whole bunch of unnecessary WL's ..."
Don't bother creating such intermediate nodes. If the intermediate nodes don't exist, how could the final one exist? :S
--
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
19 years, 8 months
[JBoss JIRA] Commented: (JBAOP-37) Before, After, After Throwing support
by Flavia Rainone (JIRA)
[ http://jira.jboss.com/jira/browse/JBAOP-37?page=comments#action_12347840 ]
Flavia Rainone commented on JBAOP-37:
-------------------------------------
The annotation names Thrown and Invocation are temporary.
We need to choose the names for advice parameters of the types Invocation and Throwable.
> Before, After, After Throwing support
> -------------------------------------
>
> Key: JBAOP-37
> URL: http://jira.jboss.com/jira/browse/JBAOP-37
> Project: JBoss AOP
> Issue Type: Feature Request
> Affects Versions: 2.0.0.alpha1
> Reporter: Bill Burke
> Assigned To: Flavia Rainone
> Fix For: 2.0.0.alpha3
>
> Original Estimate: 1 week
> Remaining Estimate: 1 week
>
> This should be optimized as well. I've done a non-CVS-checked-in prototype of this.
> Feature Details:
> To use this feature, one should use the xml tags 'before', 'after' and 'throwing'.
> The signature of these advices should take any annotated arguments (annotation rules follow) and 'after' can return a value in order to overwrite/replace the intercepted join point returned value.
> Besides, to continue using the advice around, the user should just continue using the 'advice' xml tag.
> Around advices should either stick to the signature
> Object [advice_name](Invocation invocation)
> Or they can now use annotated parameters, as in 'before', 'after' and 'throwing'
> The parameters can be annotated with JoinPoint, Invocation, Return, Throwable, Arg, Args, Callee, Caller and Target.
> Parameter Annotation Rules:
> Except for around default signature, all parameters must be annotated with one of the annotations defined in package org.jboss.aop.advice. We have annotations that are allowed only for specific types of join points, and we have annotations that are allowed only for specific types of advices.
> These annotations are allowed depending on the advice type:
> - JoinPoint: Before, After, Throwing
> - Invocation: Around
> - Return: Around, After
> - Throwable: Throwing
> These annotations are allowed depending on the join point type:
> - Callee: call join points
> - Caller: call join points
> - Target: every non-static join point that is not a call
> Finally, we have the mutually exclusive annotations Arg and Args. Both can always be used (but not on the same advice method). The first one must annotate every advice parameter whose value is the value of a join point argument. The second one annotates parameters of type Object[] that must receive all join point arguments values.
> Advice Matching Rules
> Every Arg parameter is bound to a join point argument of the same type. If there is more than one join point argument with the requested type, then the Arg parameter will be bound to the first join point argument that has not been bound yet.
> When there are overloaded advice methods, JBoss AOP will use a priority order to pick the best match. The advice method with the most suitable type of the highest priority annotated parameter type is chosen.
> The increasing priority order of arguments is: Arg/Args, Return/Throwable, Target/Callee/Caller , JoinPoint/Invocation.
--
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
19 years, 8 months