adithya narayan wrote:The above thing compiles. I don't get how you are allowed to not specify a type of class while creating. According to the documentation:
But you are specifying a type:
Class. that class itself is generic, which may be what is confusing you. But
Class<? extends BaseSessionBean>,
Class<EJB>,
Class<String> all resolve to the same type:
Class.
adithya narayan wrote:but if i call it as follows (don't even know whether this should be the way to call the method):
it doesn't compile! Nor does the following :
How is
Mediator defined? And what compiler error are you getting? If Mediator isn't a subclass of
BaseSessionBean then you won't be able to call the method because the signature doesn't match. If it is, something else is going on.