• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

If the bean doesn't meet the requirements for passivation.

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please clarify me the below doubt,

1. If the bean does not meet the requirements for passivation at the end of ejbPassivate method - What will happen? Is it the field which is not meeting the requirements will be simply ignored and the bean is passivated? OR There is a possibility that the container may destroy the bean itself.

2. In one of the material, i saw that the - The container CAN choose to passivate an entity bean instance WITHIN a transaction. -- Is it possible to passivate the entity bean within the transaction, when it is not possible in session beans.


Thanks in Advance.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. If the bean does not meet the requirements for passivation at the end of ejbPassivate method - What will happen? Is it the field which is not meeting the requirements will be simply ignored and the bean is passivated? OR There is a possibility that the container may destroy the bean itself.

-- The container destroys the bean.

2. In one of the material, i saw that the - The container CAN choose to passivate an entity bean instance WITHIN a transaction. -- Is it possible to passivate the entity bean within the transaction, when it is not possible in session beans.

-- This is not possible. The container cannot passivate an EJB when it is busy in a transaction.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition to 1, the container will throw an IllegalStateException, which is a system exception, and as if such type of exception encountered, the container will then destroy the bean.

Nick
 
Narasimha Rao B.
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Keerthi P:
1. If the bean does not meet the requirements for passivation at the end of ejbPassivate method - What will happen? Is it the field which is not meeting the requirements will be simply ignored and the bean is passivated? OR There is a possibility that the container may destroy the bean itself.

-- The container destroys the bean.

2. In one of the material, i saw that the - The container CAN choose to passivate an entity bean instance WITHIN a transaction. -- Is it possible to passivate the entity bean within the transaction, when it is not possible in session beans.

-- This is not possible. The container cannot passivate an EJB when it is busy in a transaction.



For question 1 - Is it not wrong to discard the bean instance, if one of the member variable is not meeting the requirements for passivation.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic