예제 #1
0
 public FileAccess(String domain) {
   _domain = domain;
   _isLocal = Util.isLocal();
   if (_isLocal) {
     _rootFile = Util.initLocalResource(_domain);
     return;
   }
   try {
     // _home=(IFileMgrHome)ServiceLookup.getInstance(
     //  ServiceLookup.CLIENT_CONTEXT).getHome(IFileMgrHome.class);
     // if (_home == null) {
     //  System.out.println("Lookup failure: Home should not be null.");
     //  throw new Exception();
     // }
     // _remote = _home.create();
     _remote =
         (IFileMgr)
             ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
                 .getObj(IFileMgrHome.class.getName(), IFileMgrHome.class, new Object[0]);
     if (_remote == null) {
       System.out.println("Lookup failure: Remote should not be null.");
       throw new Exception();
     }
   } catch (Exception ex) {
     System.out.println(" Exception in SetUp  : " + ex.getMessage());
     ex.printStackTrace();
   }
 }
예제 #2
0
 public FileAccess() {
   _isLocal = Util.isLocal();
   if (_isLocal) {
     return;
   }
   try {
     /*
     _home=(IFileMgrHome)ServiceLookup.getInstance(
       ServiceLookup.CLIENT_CONTEXT).getHome(IFileMgrHome.class);
     if (_home == null) {
       System.out.println("Lookup failure: Home should not be null.");
       throw new Exception();
     }
     _remote = _home.create();
     */
     _remote =
         (IFileMgr)
             ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
                 .getObj(IFileMgrHome.class.getName(), IFileMgrHome.class, new Object[0]);
     if (_remote == null) {
       System.out.println("Lookup failure: Remote should not be null.");
       throw new Exception();
     }
   } catch (Exception ex) {
     System.out.println(" Exception in SetUp  : " + ex.getMessage());
     ex.printStackTrace();
   }
 }
 private ICertificateManagerObj getManager() throws ServiceLookupException {
   return (ICertificateManagerObj)
       ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
           .getObj(
               ICertificateManagerHome.class.getName(),
               ICertificateManagerHome.class,
               new Object[0]);
 }
 private static IJMSMsgHandlerObj getRemoteJMSMgr()
     throws ServiceLookupException, CreateException, RemoteException {
   IJMSMsgHandlerHome home =
       (IJMSMsgHandlerHome)
           ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
               .getHome(IJMSMsgHandlerHome.class.getName(), IJMSMsgHandlerHome.class);
   return home.create();
 }
 private IFieldMetaInfoLocalHome getFieldMetaInfoHome() throws Exception {
   return (IFieldMetaInfoLocalHome)
       ServiceLocator.instance(ServiceLocator.LOCAL_CONTEXT)
           .getHome(IFieldMetaInfoLocalHome.class.getName(), IFieldMetaInfoLocalHome.class);
 }
 /**
  * Obtain the Home interface for the EntityMetaInfo bean.
  *
  * @return the Home interface of the EntityMetaInfo bean.
  */
 private IEntityMetaInfoHome getEntityMetaInfoHome() throws ServiceLookupException {
   return (IEntityMetaInfoHome)
       ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
           .getHome(IEntityMetaInfoHome.class.getName(), IEntityMetaInfoHome.class);
 }
 private IMetaInfoObj getMetaInfoObj() throws ServiceLookupException {
   return (IMetaInfoObj)
       ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
           .getObj(IMetaInfoHome.class.getName(), IMetaInfoHome.class, new Object[0]);
 }
예제 #8
0
 public static IMappingManagerObj getMappingManager() throws ServiceLookupException {
   return (IMappingManagerObj)
       ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
           .getObj(IMappingManagerHome.class.getName(), IMappingManagerHome.class, new Object[0]);
 }
 private static INotifierMgrLocalObj getLocalNotifierMgr() throws Exception {
   return (INotifierMgrLocalObj)
       ServiceLocator.instance(ServiceLocator.CLIENT_CONTEXT)
           .getObj(
               INotifierMgrLocalHome.class.getName(), INotifierMgrLocalHome.class, new Object[0]);
 }