This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am preparing for SCBCD.I am stuck in below specs .(Using Jboss 4.2.1 and EJB 3.0)
It is being said in specs:
If a stateless session bean, message-driven bean, or stateful session bean with a transaction-scoped persistence context calls a stateful session bean with an extended persistence context in the same JTA transaction, an IllegalStateException is thrown. >>
Unfortunately i am not getting this error, though it does not pass the PC (Persistence Context).
Transactional Scoped SFSB
Extended Scope PC SFSB
Am i missing something or have incorect knowledge of Specs.
I tried what you described on Glassfish 3.1, and that is exactly what happens: when a SLSB with transactional context calls my SFSB with extended context entitymanager I get the following exception:
Maybe you should use a 100% certified JEE5 Server. All I know about JBoss 4.2.x is that its not a JEE 5 certified app server, so perhaps its missing one or the other spec.
Try it on Glassfish 3 / 3.1 or JBoss 5.1.
Joined: Jun 05, 2008
Thanks Joe for your quick response.
I will definately try this on JBoss5.1 and will post the result.
Joined: Jun 05, 2008
I have tried JBoss5.1 with above said scenario and result is same(no EJBException) .
What is wrong with JBoss5. Does it implies to EJB 3.0 spec or not.
I had a very good impression of JBoss Community till now but i am afraid all has been changed since this post.
They have ignored very basic and important spec.
Please post if anyone got it right, i will be more than happy to use JBoss again.
Joined: Apr 14, 2009
Looks like you've discovered a bug - or is it a feature?
I checked it too on JBoss 5.1 - got the same results as you. JBoss for some reason allows this specification violation concerning extended contexts.
Glassfish is the reference implementation of all Java EE specs, so maybe its best to practice SCBCD stuff with Glassfish.
Still, I find it very disappointed to find out that a supposedly Java EE certified application server allows this sort of spec violation.
Maybe its worth to check the JBoss bug list to see if its a known issue. Next I think I'll try JBoss 6 CR1 to see if it behaves the same way. I'll post my results here