December 2002
Intermediate to advanced
1050 pages
24h 49m
English
The MoviesBean JavaBean (shown previously) is shown here again just to identify the portions of the class that pertain to the retrieval of entity beans.
package movies.beans;
import java.rmi.*;
import javax.naming.*;
import javax.rmi.*;
import javax.ejb.*;
import java.util.*;
import db.*;
import movies.ejb.*;
public class MoviesBean extends MoviesVO {
private InitialContext context;
private MoviesEntityRemote movies;
private MoviesEntityHome moviesHome;
public MoviesBean() {
try {
Hashtable env = new Hashtable();
//
// get a connection to the EJB server (Jboss)
//
env.put( "java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.put( "java.naming.provider.url", "jnp://localhost:1099"); ... |
Read now
Unlock full access