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

stateless session bean question

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void ejbCreate(int i) {
System.out.println("ejbCreate(i)");
}
Given a currently working stateless session bean, what
will be the outcome
upon deploying and executing the bean if you added the
above unique method
to the implementation class of a stateless session
bean (and made no other
changes)?
a Compile time error during stub/skeleton generation
b Compile time error for home interface
c Code will compile without errors.
d Compile time error for remote interface
e Compile time error for bean implementation

----------------------------------
Given the above code in your stateless session bean
business method
implementation, and the transaction is
container-managed with a Transaction
Attribute of TX_SUPPORTS, which one of the following
is the first error
generated?
a Error when compiling home interface
b Error while generating stubs and skeletons
c NullPointerException during deployment
d Runtime error
e Compile-time error for the bean implementation
 
Gus Mus
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

public void ejbCreate(int i) {
System.out.println("ejbCreate(i)");
}
Given a currently working stateless session bean, what
will be the outcome
upon deploying and executing the bean if you added the
above unique method
to the implementation class of a stateless session
bean (and made no other
changes)?
a Compile time error during stub/skeleton generation
b Compile time error for home interface
c Code will compile without errors.
d Compile time error for remote interface
e Compile time error for bean implementation

I think the correct answer is C, since it's only added into the Implementation class of Session Bean, the story will be different if you add it at home, since Stateless Session Bean should only have 1 create at home without any args (The reason if you provide ejb with args then how containers create these beans for pooling ? )
[ February 28, 2003: Message edited by: Gus Mus ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic