Package javax.naming

Examples of javax.naming.InitialContext.lookup()


  }

  protected ClientServiceRegistry getClientServiceRegistry() {
    try {
      InitialContext ic = new InitialContext();
      return (ClientServiceRegistry)ic.lookup(TEIID_RUNTIME);
    } catch (NamingException e) {
      throw new TeiidRuntimeException(e);
    }
  }
 
View Full Code Here


         Hashtable jndiEnv = null;
         try
         {
            InitialContext iniCtx = new InitialContext();
            jndiEnv = iniCtx.getEnvironment();
            server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
         }
         catch (NamingException ex)
         {
            throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
         }
View Full Code Here

           ctx = new InitialContext();
        } catch (NamingException except) {
            throw new RuntimeException( "Can't create InitialContext", except);
        }
        try {
            return (TransactionManager) ctx.lookup(JNDI_LOOKUP_PATH);
        } catch (NamingException except) {
            throw new RuntimeException( "Error while looking up TransactionManager at " + JNDI_LOOKUP_PATH, except);
        }
    }
View Full Code Here

    int authenticationString = AUTHENTICATION_FAILED_STATUS;
    HashMap hm = null;
    getPATH();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      LoginHome lh = (LoginHome) ic.lookup("Login");
      Login remote = (Login) lh.create();
      remote.setDataSource(dataSource);
      hm = (HashMap) remote.authenticateUser(userName, passwd);
      //checking hashmap
      if (hm != null && hm.get("userid")!= null && hm.get("individualid")!= null && hm.get("lastName")!= null && hm.get("firstName")!= null ) {
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(((HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext())).getDataSource();
    ArrayList arrlfromCV = null;
    try {
      InitialContext it = CVUtility.getInitialContext();
      QBSyncHome qbsh = (QBSyncHome) it.lookup("QBSync");
      QBSync remote = (QBSync) qbsh.create();
      remote.setDataSource(dataSource);
      arrlfromCV = (ArrayList) remote.beginSynchronisation(individualID, LastSyncDate, moduleName, VO, isNewFlag);
    }
    catch (Exception e) {
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(((HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext())).getDataSource();
    boolean resultFlag = false;
    try
    {
      InitialContext it = CVUtility.getInitialContext();
      QBSyncHome qbsh = (QBSyncHome) it.lookup("QBSync");
      QBSync remote = (QBSync) qbsh.create();
      remote.setDataSource(dataSource);
      resultFlag = (boolean)remote.updateExternalIDs(hm, moduleName);
    }
    catch (Exception e)
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(((HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext())).getDataSource();
    try
    {
      InitialContext it = CVUtility.getInitialContext();
      QBSyncHome qbsh = (QBSyncHome) it.lookup("QBSync");
      QBSync remote = (QBSync) qbsh.create();
      remote.setDataSource(dataSource);
      remote.deleteObjects(ModuleName, VO, individualID);
    }
    catch (Exception e)
View Full Code Here

    if (checkForSession() == true) {
      try
      {
        //EJB call
        InitialContext it = CVUtility.getInitialContext();
        QBSyncHome qbsh = (QBSyncHome) it.lookup("QBSync");
        QBSync remote = (QBSync) qbsh.create();
        remote.setDataSource(dataSource);
        //convertion module calls here
        QBXMLConverter converter = new QBXMLConverter();
        converter.setDataSource(dataSource);
View Full Code Here

    try {

      InitialContext ic = getInitialContext();

      // Call Local EJB to add the record in DB
      HistoryLocalHome historyLocal = (HistoryLocalHome) ic.lookup("local/History");
      HistoryLocal history = historyLocal.create();
      history.setDataSource(dataSource);
      history.addHistoryRecord(historyInfo);

    } catch (Exception e) {
View Full Code Here

    try {

      InitialContext ic = getInitialContext();

      // Call Local EJB to add the record in DB
      HistoryLocalHome historyLocal = (HistoryLocalHome) ic.lookup("local/History");
      HistoryLocal history = historyLocal.create();
      history.setDataSource(ds);
      history.deleteHistoryRecord(operation, recordTypeID, recordID);
    } catch (Exception e) {
      logger.error("[deleteHistoryRecord]: Exception", e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.