package com.alodar.example.interfaces;
import java.lang.*;
import javax.rmi.PortableRemoteObject;
import javax.naming.NamingException;
import javax.naming.InitialContext;
import java.util.Hashtable;
public class ItemUtil
{
public static com.alodar.example.interfaces.ItemHome getHome() throws NamingException
{
InitialContext initialContext = new InitialContext();
try {
java.lang.Object objRef = initialContext.lookup(com.alodar.example.interfaces.ItemHome.JNDI_NAME);
com.alodar.example.interfaces.ItemHome home = (com.alodar.example.interfaces.ItemHome)PortableRemoteObject.narrow(objRef, com.alodar.example.interfaces.ItemHome.class);
return home;
} finally {
initialContext.close();
}
}
public static com.alodar.example.interfaces.ItemHome getHome( Hashtable environment ) throws NamingException
{
InitialContext initialContext = new InitialContext(environment);
try {
java.lang.Object objRef = initialContext.lookup(com.alodar.example.interfaces.ItemHome.JNDI_NAME);
com.alodar.example.interfaces.ItemHome home = (com.alodar.example.interfaces.ItemHome)PortableRemoteObject.narrow(objRef, com.alodar.example.interfaces.ItemHome.class);
return home;
} finally {
initialContext.close();
}
}
public static com.alodar.example.interfaces.ItemLocalHome getLocalHome() throws NamingException
{
InitialContext initialContext = new InitialContext();
try {
com.alodar.example.interfaces.ItemLocalHome localHome = (com.alodar.example.interfaces.ItemLocalHome) initialContext.lookup(com.alodar.example.interfaces.ItemLocalHome.JNDI_NAME);
return localHome;
} finally {
initialContext.close();
}
}
}