• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

stateless session bean question

 
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
 
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 ]
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic