package demo;
import javax.ejb.EJBException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
public interface StoryHome extends javax.ejb.EJBHome {
public demo.Story create( java.lang.String author, java.lang.String subject )
throws java.rmi.RemoteException, javax.ejb.CreateException;
public demo.Story findById( long id )
throws java.rmi.RemoteException, javax.ejb.FinderException;
public demo.Story findByAuthor( java.lang.String author )
throws java.rmi.RemoteException, javax.ejb.FinderException;
final static String JNDI_NAME = "demo.StoryHome";
static class Finder {
public static StoryHome narrow( Object home ) {
return (StoryHome) PortableRemoteObject.narrow( home, StoryHome.class );
}
public static StoryHome lookup() throws NamingException {
return narrow( new InitialContext().lookup(JNDI_NAME) );
}
}
}