EJB Resource Manager

What is a Resource Manager Connection Factory(RMCF)?

- A RMCF is an object which creates the connections to the resource manager.

- For example, any object that implements the javax.sql.DataSource interface is a resource manger connection factory for java.sql.Connection objects.

- This RMCF object references are bound to the actual RMCFs which are existing in the target environment, at deployment time.

- A bean must consist the conversational state for serialization (during passivation) to the secondary storage to be successful.

Explain the five types of resource manager that J2EE compliant application server must support.

Database resources :

- The database resources are needed for managing resources for a J2EE products.

- The transactional access can be to JDBC resource, on one JDBC resource per transaction.

- These are also available for servlets, JSP along with EJB.

- It is supported to access the same JDBC resource within the scope of the same transaction to other components that access the JDBC.

- For example: Servlet may start a transaction, and can invoke the methods for business logic implementation for enterprise beans to modify the same database, within the same transaction. To utilize these resources, the platform specific-API JDBC is needed.

JavaMail sessions :

- Java mail provides platform and protocol independent mailing services for java applications.

- Using JavaMail API , the recipient can receive an e-mail that can be sent. Java mail creates loosely coupled, asynchronous messaging system .JavaMail session is referenced directly via a JNDI lookup.

JMS Connections :

- JMS creates connection factories which are used to create connections to JMS providers.

- JMS connection factory can be used with session and entity beans to produce synchronously produce and receive messages.

- JMS is used to receive asynchronous messages for message-driven beans.

- JMS is used to manage the transactions in distributed environment.

- JMS enables the client’s applications can access web components.

URL Resources :

- Using an administrative object called URL resource object, any J2EE application, server can access the URL access through an application.

- A URL resource object is technically referred to as URL resource manager connection factory.

- Using JNDI lookup factory, any J2EE application can obtain an object reference.

- A mechanism called URL provider provides the underlying communication support between the URL resource objects and specific URL resource.

- The URL provider provides the necessary implementation level or support for the specified protocol.

Legacy Resources :

- The JDBC utility makes the flexibility for the java applications to access the relational databases.

- There is still a demanding need for a way to access other databases such as hierarchical and flat database resources.

- These resources contained the data that were evolved before the advent of relational databases and called ‘legacy resources’.

- It is inevitable to access these databases by the applications.

- Visual Age for Java provides the support for these legacy systems.

- These concepts were introduced into J2EE Connector Architecture 1.0 specification.

Describe the need and importance of URL EJB resource mechanism for J2EE container.

- A URL (Web) resource is a specific type of resource that is pertaining to different web applications.

- An EJB resource is a specific type of resource that is pertaining to EJBs.

- To provide security to EJB, EJB JARs will be created.

- As the J2EE application standardizes the URL and EJB, an application server integrates these standard mechanisms with its security services that provides the choice of these two techniques.

- This in turn provides the security between URL and EJB resources.

The benefits of these techniques are :

1. Unified security management : allows the administrators to modify the security configurations.

2. Using application server’s deployment descriptors, considerable amount of security is provided without much of hard coding the documentations.

Explain how to utilize resource environment references to obtain a reference to a JMS queue.

- The following shows how a reference to the appropriate JMS queue is utilized:

1. Obtain the initial context of JNDI.

2. Obtain the current WAR specific context.

3. Resource references, ejb references, etc are held by web.xml using InitialContext’s lookup method by typecasting (Context).

4. Obtain the specific resource reference for the JMS QueueConnectionFactory using InitialContext’s lookup() method by typecasting(QueueConnectionFactory), which were defined / available in the web.xml with the following attributes:
Name: jms/qcf Type: javax.jms.QueueConnectionFactory
Authentication: Container
JNDI Name: jms/qcf
5. Obtain the specific resource reference for the JMS QueueConnectionFactory using InitialContext’s lookup() method by type casting (Queue) which were defined / available in the web.xml with the following attributes:
Name: jms/queue Type: javax.jms.Queue
Authentication: Container
JNDI name : jms/queue
EJB security
EJB security - EJB security model, What are the EJB-specific issues in security management? Ways to authenticate a client before it contacts the server?, steps involved in security design for EJB application.
EJB design
EJB design - Advantages of implementing a distributed system using EJB?, disadvantages pf implementing a distributed system using EJB.
EJB performances
EJB performances - Explain how to avoid large data transfer using EJBs, What is lazy loading?, Explain how to lazy-load enterprise beans., advantages of smart stubs and show how to accelerate marshalling, explain how to tune the performance when deploying EJBs.
Post your comment