• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transactional and Extended Scoped Persistence Context does not work as per spec.

 
Greenhorn
Posts: 12
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

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.

Thanks in Advance.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
pulkit mehra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joe for your quick response.
I will definately try this on JBoss5.1 and will post the result.
 
pulkit mehra
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

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.

Pulkit
 
Joe carco
Ranch Hand
Posts: 82
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
What are you doing in my house? Get 'em tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic