3

I know that a Stateful EJB can be accessed concurrently by a particular client. The container is serializing the requests and execute them one after another.

The question is - can you set the EJB container to let the concurrent access to the SFSB?

I know that I have a @AccessTimeout which allows me to configure that the SFSB may be accessed at the same time more than once by the particular client. However, it allows me to specify that the concurrent access is not allowed at all or let the container serialize the requests.

Does the EJB specification forbids such thing? I know I can achieve concurrent access with the Singleton EJB using @ConcurrencyManagement, but I'm just curious if it's possible to set some vendor-specific configuration property to allow such behavior for SFSBs.

Thanks in advance!

Piotr Nowicki
  • 17,914
  • 8
  • 63
  • 82

2 Answers2

3

Just last month a JIRA issues was filed that proposes exactly this: http://java.net/jira/browse/EJB_SPEC-24

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
  • Thanks @Arjan ! Some time ago I've read the EJB 3.2 JIRA but didn't notice that! Hope we'll be able to see this in the future EJB release (I've voted on this feature)! – Piotr Nowicki Nov 05 '11 at 17:25
  • 2
    @Pedro, would be great if you could comment on that JIRA. It could use some discussion. Specifically I mention transaction locking and container removal as issues. If you don't need these, would be great to hear that feedback. – David Blevins Nov 06 '11 at 00:02
2

The EJB specification does not forbid vendor extensions, so in theory, a vendor could implement an extension to allow stateful session beans to be accessed concurrently. In practice, I'm not aware of any that allow that.

Brett Kail
  • 33,593
  • 2
  • 85
  • 90