Invoke servlet from EJB components?
Can anyone here tell me how to invoke the EJB components through servlet, I have gone through many sites for that but there are lot of information available which is very vast an i dont have enough time to read all of that, also other information related to it makes me away from what i actually wanted from it.
so please try to provide me short and sweet information related to it.
Re: Invoke servlet from EJB components?
An EJB component can manage its own persistence (by means of the logic you provide in the bean) or delegate persistence services to the EJB container. Container-managed persistence means that the data appears as member data and the container performs all data retrieval and storage operations for the EJB component.
Re: Invoke servlet from EJB components?
There are three types of servlet engines: 1) StandAlone Servlet Engine: It is a web server that includes built in support for servlets.For eg Java Web Server etc. 2) Add on Servlet Engine:It functions as a plug-in for an existing server,a server that was not originally designed with servlets in mind.For eg JServ, JRun,IBM WebSphere etc. 3) Embeddable Servlet Engine:It is a lightweight server deployment platform that can be embeddable in another application. That application becomes the true server.For eg JavaServerEngine etc.
EJB Application Servers provide an EJB container, which is the environment that beans will execute in, and this container will manage transactions, thread pools, and other issues as necessary. These application servers are usually stand-alone products, and developers would tie their servlets/JSP pages to the EJB components via remote object access APIs. Depending on the application server, programmers may use CORBA or RMI to talk to their beans, but the baseline standard is to use JNDI to locate and create EJB references as necessary.
Re: Invoke servlet from EJB components?
Yes you can make a servlet as a client and access the EJB. You have to create a WEB-INF folder and in that folder create a classes folder and complie and keep all your class files and depoly.