[jboss-user] [EJB3] - Re: JBoss 6.1.0.Final SFSB concurrency issue

2013-07-29 Thread Octavian Pop
Octavian Pop [https://community.jboss.org/people/PopOctavian] created the 
discussion

"Re: JBoss 6.1.0.Final SFSB concurrency issue"

To view the discussion, visit: https://community.jboss.org/message/830287#830287

--
No one experienced this?

Below I posted the ContainerManagedConcurrencyInterceptor implementation which 
is invoked when a method from statefull beans is invoked.

public Object invoke(Invocation invocation) throws Throwable
    {
    Lock lock = getLock(invocation);
    long time = DEFAULT_MAX_TIMEOUT_VALUE;
    TimeUnit unit = DEFAULT_MAX_TIMEOUT_UNIT;
    AccessTimeoutEffigy timeout = getAccessTimeout((MethodInvocation) 
invocation);
 
 
    if (timeout != null)
    {
    if (timeout.getTimeout() < 0)
    {
    // for any negative value of timeout, we just default to max 
timeout val and max timeout unit.
    // violation of spec! But we don't want to wait indefinitely.
    logger.debug("Ignoring a negative @AccessTimeout value: " + 
timeout.getTimeout() + " and timeout unit: "
    + timeout.getUnit().name() + ". Will default to timeout 
value: " + DEFAULT_MAX_TIMEOUT_VALUE
    + " and timeout unit: " + 
DEFAULT_MAX_TIMEOUT_UNIT.name());
    }
    else
    {
    time = timeout.getTimeout();
    unit = timeout.getUnit();
    }
    }
    boolean success = lock.tryLock(time, unit);
    if (!success)
    {
    throw new ConcurrentAccessTimeoutException("EJB 3.1 PFD2 4.8.5.5.1 
concurrent access timeout on " + invocation
    + " - could not obtain lock within " + time + unit.name());
    }
    try
    {
    return invocation.invokeNext();
    }
    finally
    {
    lock.unlock();
    }
    }


The invocations on incrementNumber from GenericSFB are serialized at boolean 
success = lock.tryLock(time, unit);
It does not make sens to have mutual exclusion for statefull beans invocatins, 
as it looks to be implemented.
--

Reply to this message by going to Community
[https://community.jboss.org/message/830287#830287]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [EJB3] - Re: JBoss 6.1.0.Final SFSB concurrency issue

2013-07-20 Thread Octavian Pop
Octavian Pop [https://community.jboss.org/people/PopOctavian] created the 
discussion

"Re: JBoss 6.1.0.Final SFSB concurrency issue"

To view the discussion, visit: https://community.jboss.org/message/828952#828952

--
It is the community JBoss AS 6.1.0.Final.
--

Reply to this message by going to Community
[https://community.jboss.org/message/828952#828952]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [EJB3] - Re: JBoss 6.1.0.Final SFSB concurrency issue

2013-07-19 Thread jaikiran pai
jaikiran pai [https://community.jboss.org/people/jaikiran] created the 
discussion

"Re: JBoss 6.1.0.Final SFSB concurrency issue"

To view the discussion, visit: https://community.jboss.org/message/828896#828896

--
Is this JBoss EAP 6.1.0.Final (based on AS7) or the community JBoss AS 
6.1.0.Final?
--

Reply to this message by going to Community
[https://community.jboss.org/message/828896#828896]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user