Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 Questions : Can Messge Beans have an Instance Variable

 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have the following 2 questions
- Can a Message Driven Bean use Instance Variables
- What are the permissible values of <res-auth>. I thought it were either of these Bean / Container, but the WhizLabs - Practise Exam - 1, Q 29 answers it as - Application and Container ??
Thanks for your time and help
Sumit
 
C Chavan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. MDBs can have instance variables but won't be client specific. one may use constants (static final). better define local variables in onMessage()
2. the correct values are Container and Application
 
sopal Pal
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chavan
Thanks for your reply.
the HFE book refers to the values - as Beans/Container for the <res-auth> values.
Is that wrong ??
Sumit
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the spec:

<!--
The res-auth element specifies whether the enterprise bean code signs
on programmatically to the resource manager, or whether the Container
will sign on to the resource manager on behalf of the enterprise bean.
In the latter case, the Container uses information that is supplied by
the Deployer.
The value of this element must be one of the two following:
<res-auth>Application</res-auth>
<res-auth>Container</res-auth>
-->
<!ELEMENT res-auth (#PCDATA)>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic