Component Model
Component has become new trend nowadays in software engineering. Component is self contained element of software that can be controlled dynamically. The basic concepts behind components are to build applications from reusable units that can easily be distributed by interoperating according to a set of rules and regulation.
Java Beans: Component Architecture for Java.
Java beans are Java’s component model. It allows users to construct applications by piecing components together either programmatically or visually (or both).It has the ability to write applications quickly and easily by using a palette of components that can be assembled to form larger applications. It is right to say that any component you can imagine can be written as a JavaBean, and then plugged into an application. If you know how to write software in Java, you know how to use and create Beans The model is made up of architecture and an API (Application Programming Interface). Together, these elements provide a structure whereby components can be combined to create an application.
EJB Architecture
When a client sends a request to server through jsp, container sees that request is for servlet and then creates two objects HttpServletResponse and HttpServletRequest. The container finds the correct servlet and creates a thread for that request but before passes the request and response object to the servlet thread, it passes to filter chain to intercepts and process the request .The servlet is having no knowledge of filter. After filtering the request the container passes the request and response object to the servlet thread and calls the service () of servlet depending on the type of request. Depending on the request servlet container passes the request to EJB container. But client never calls any of its requests directly. So when client sends a request to EJB object through servlet EJB container generates two objects EJB object and Home object which manage the service like Security, Persistence etc. and delegate the request to the associated beans(session, entity and message driven) instances. Home object hides the actual location of EJB object. So client access only that EJB objects that are stored at different location by the home object. Depends on the beans request goes to database through JDBC and fetch response from database and sends to EJB objects and then response goes to particular servlet. Thread completes and converts the response object to HTTP Response and sends back to the filter chain and again filter chain process the response and response sends to the client, then delete the request and response object. Finally client accepts response from servlet through JSP.
Component has become new trend nowadays in software engineering. Component is self contained element of software that can be controlled dynamically. The basic concepts behind components are to build applications from reusable units that can easily be distributed by interoperating according to a set of rules and regulation.
Java Beans: Component Architecture for Java.
Java beans are Java’s component model. It allows users to construct applications by piecing components together either programmatically or visually (or both).It has the ability to write applications quickly and easily by using a palette of components that can be assembled to form larger applications. It is right to say that any component you can imagine can be written as a JavaBean, and then plugged into an application. If you know how to write software in Java, you know how to use and create Beans The model is made up of architecture and an API (Application Programming Interface). Together, these elements provide a structure whereby components can be combined to create an application.
EJB Architecture
When a client sends a request to server through jsp, container sees that request is for servlet and then creates two objects HttpServletResponse and HttpServletRequest. The container finds the correct servlet and creates a thread for that request but before passes the request and response object to the servlet thread, it passes to filter chain to intercepts and process the request .The servlet is having no knowledge of filter. After filtering the request the container passes the request and response object to the servlet thread and calls the service () of servlet depending on the type of request. Depending on the request servlet container passes the request to EJB container. But client never calls any of its requests directly. So when client sends a request to EJB object through servlet EJB container generates two objects EJB object and Home object which manage the service like Security, Persistence etc. and delegate the request to the associated beans(session, entity and message driven) instances. Home object hides the actual location of EJB object. So client access only that EJB objects that are stored at different location by the home object. Depends on the beans request goes to database through JDBC and fetch response from database and sends to EJB objects and then response goes to particular servlet. Thread completes and converts the response object to HTTP Response and sends back to the filter chain and again filter chain process the response and response sends to the client, then delete the request and response object. Finally client accepts response from servlet through JSP.
No comments:
Post a Comment