Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Few EJB Questions

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need help on following questions
1) What is the default transaction of the methods in the bean if no transaction attribute is specified.
ans ) Is it supports.
2) When client calls create on home interface of an entity bean what happens first whether ejbobject is created first or first ejbcreate method is called on the bean instance .
3) If statefulsession bean method is involved in transaction will the container passivate it before the transaction iscompleted.
4) Will the entity bean involved in transaction will be passivated.
Please help
Thanks and Regards
Amit Aggarwal
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anyone answer this?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
if you people ve any doubt, ask me. I ll be more than happy if i can help u guys.I joined this forum from today as i ve finally decided to give Sun architect exam.Thinking to give it by next week.

Hi Amit,
Required is the default transaction attribute.
When client calls create() of home interface,
call goes to ejb container which ll instantiate the ejb bean, set corresponding context to it and then it ll call ejbCreate() on that instance.
I think when a session bean's method is within TX, that bean wont be passivated. And there is no passivation state for entity bean. It has 3 states only, doesn't exist,pooled state,ready state.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually the part about ejbcreate is a bit incorrect. It is really dependent on the Application Server about how ejbcreate is handled. It could very well create a new EJBObject upon each call, but most Application Servers pool Stateless Session EJBObjects for performance reason. In this case ejbcreate will just go and get one of the pooled instances.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic