SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
A session bean class can subclass another session bean or any other POJO.
For example, a stateless session bean named BidManager can extend
another session bean PlaceBidBean in the following way:
@Stateless
public BidManagerBean extends PlaceBidBean implements BidManager {
...
}
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
The session bean class may have superclasses and/or superinterfaces. If the session bean has
superclasses, the business methods, lifecycle callback interceptor methods, the timeout callback
method, the methods of the optional SessionSynchronization interface, the
Init or ejbCreate<METHOD> methods, the Remove methods, and the methods of the
SessionBean interface, may be defined in the session bean class, or in any of its superclasses.
A session bean class must not have a superclass that is itself a session bean class.
Originally posted by nitin pai:
Quoting from the spec section 4.6.2, 6th point in "Optionally"
Books can have mistakes, but certification will be based on specification.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Originally posted by Jothi Shankar Kumar Sankararaj:
So Nitin, did the specs go wrong?
Originally posted by nitin pai:
Do you even know what specs means?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Originally posted by Christophe Verre:
I tried this on Glassfish :
The client :
It's funny that it worked![]()
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
[My Blog]
All roads lead to JavaRanch
Originally posted by Christophe Verre:
Sergio, in your example, how would you call doSomething on a SimpleBean ?
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Originally posted by Jothi Shankar Kumar Sankararaj:
I thought that there would be a mention somthing like..."It is up to the container vendors...." so is our case similiar to that? As per the specs, a session bean cannot subclass another session bean but it is up to the vendors to make subclassing session bean possible.
A session bean class must not have a superclass that is itself a session bean class.
Originally posted by Jaikiran Pai:
So if Glassfish is allowing the superclass itself to be a session bean, then i would say that its a bug in Glassfish server, since its not following the specs.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
From the specs...is ok but I read in the book EJB 3 in Action on Subclassing rules for Session beans?? Here is what it says...
quote:A session bean class can subclass another session bean or any other POJO.
For example, a stateless session bean named BidManager can extend
another session bean PlaceBidBean in the following way:
@Stateless
public BidManagerBean extends PlaceBidBean implements BidManager {
...
}
A session bean class must not have a superclass that is itself a session bean class.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
As per spec, parent must not be a bean (session bean), isn't it compile time issue (compiler is allowing to have bean parent)?
SCDJWS 5.0, SCBCD 5.0, SCWCD 5.0, SCJP 5.0
■ A session bean class can subclass another session bean or any other POJO.
For example, a stateless session bean named BidManager can extend
another session bean PlaceBidBean in the following way:
@Stateless
public BidManagerBean extends PlaceBidBean implements BidManager {
...
}
■ The business methods and lifecycle callback methods may be defined
either in the bean class or in a superclass. It�s worth mentioning here that
annotation inheritance is supported with several limitations with EJB 3 session
beans. For example, the bean type annotation @Stateless or @Stateful
specified in the PlaceBidBean superclass will be ignored when you
deploy the BidManagerBean. However, any annotations in the superclasses
used to define lifecycle callback methods (more about that later in this section)
and resource injections will be inherited by the bean class.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Don't get me started about those stupid light bulbs. |