Security issues in EJBs are handled almost completely in the deployment descriptor .This allows changes in security rules without rewriting or recompiling Java code. The primary concept for EJB security is that of “roles”.  A user may be in one or more roles.  It is only roles that have particular access rights, not users.  So […]

In database programming, often the concept of a “transaction” is used.  A transaction refers to one or more operations that are done in a tentative manner.  The programmer first states all operations to be done.  Then at the end, the programmer decides to commit to all the operations or to abort all of them.  If […]

We have already learned a little about the EJB’s environment.  We saw how linked EJB’s are available at JNDI names starting with the string java:comp/env/ Other resources are similarly available.  A very useful such resource is JDBC.  Of course, you can access JDBC as you have always been doing.  But EJB offers a standard method […]

In everything we have done so far, the model has been that the EJB runs on a server machine and its clients run elsewhere.  (As a special case, the “elsewhere” may happen to be the same machine.) But in an application designed using EJBs, it would be frequently necessary for one EJB to use the […]

One of the things that can be done in the deployment descriptor, is the setting of EJB “environment variables.” For example, suppose you write an EJB that will that is to be distributed to many of your customers. An example of such usage is a bank’s EJBs that need to know the interest rate.  Since […]

In everything we have done so far, we have followed the standard model of locating a “home” object, and then using it to create or find the EJB. Also, since there are no finders in the case of session beans, once the program using a session bean exits, the bean is gone in our model. […]

Deploying the session bean is similar to deploying the entity bean, but we don’t have to worry about a datasource, because entity beans are not backed up by persistent storage. We can modify the ejb.ini file as before and add just one line specifying the location of the “ejbJar”, but this is also not necessary. […]

This section gives an overview of EJBs EJBs are broadly classified into Entity Beans, Session Beans and Message-Driven Beans Entity Beans Java programmers are already familiar with objects.  An entity bean is an object with special properties: It is permanent. Standard Java objects come into existence when they are created in a program.  When the […]