Reputation: 11
can a request directly come to ejb container or it should first come to web >container and hit ejb?can anyone please explain?
I want to know the runtime flow of the application in middleware server
Upvotes: 0
Views: 64
Reputation: 33946
Yes, in two cases:
There are a few additional cases where the EJB can get control without any request:
@Startup
and defines a PostConstruct method. In this case, the bean will get control when the application is deployed.@Schedule
. In this case, the bean will get control at the specified time.In all other cases, another component (e.g., a servlet) must get control first and invoke the EJB.
Upvotes: 2