Package javax.naming

Examples of javax.naming.InitialContext.lookup()


      String strAssignedID = appRemote.getApplicationSettings("DEFAULTOWNER");
      appRemote = null;
      appHome = null;

      // Used to get the Entity information when passing the EmailAddress
      ContactHelperLocalHome contactHelperHome = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
      ContactHelperLocal contactHelperRemote =  contactHelperHome.create();
      contactHelperRemote.setDataSource(this.dataSource);

      // Setting the Record Permission for newly Created record.
      AuthorizationLocalHome authHome=(AuthorizationLocalHome)ic.lookup("local/Authorization");
View Full Code Here


      ContactHelperLocalHome contactHelperHome = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
      ContactHelperLocal contactHelperRemote =  contactHelperHome.create();
      contactHelperRemote.setDataSource(this.dataSource);

      // Setting the Record Permission for newly Created record.
      AuthorizationLocalHome authHome=(AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authRemote=(AuthorizationLocal)authHome.create();
      authRemote.setDataSource(this.dataSource);

      // get the Default Error Message Template for the Support replying emails
      EmailSettingsLocalHome emailSettingsHome=(EmailSettingsLocalHome)ic.lookup("local/EmailSettings");
View Full Code Here

      AuthorizationLocalHome authHome=(AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authRemote=(AuthorizationLocal)authHome.create();
      authRemote.setDataSource(this.dataSource);

      // get the Default Error Message Template for the Support replying emails
      EmailSettingsLocalHome emailSettingsHome=(EmailSettingsLocalHome)ic.lookup("local/EmailSettings");
      EmailSettingsLocal emailSettingsRemote=(EmailSettingsLocal)emailSettingsHome.create();
      emailSettingsRemote.setDataSource(this.dataSource);

      // Its a predefined Template for the replying message for the newly created Ticket
      EmailTemplateForm ticketTemplateForm = emailSettingsRemote.getEmailTemplate(AdministrationConstantKeys.EMAIL_TEMPLATE_SUPPORTTICKET);
View Full Code Here

      String fieldInfo = (String) replaceInfo.get("fieldInfo");
      String fieldValue = (String) replaceInfo.get("fieldValue");
      String fieldName = (String) replaceInfo.get("fieldName");

      InitialContext ic = CVUtility.getInitialContext();
      AdvancedSearchLocalHome home = (AdvancedSearchLocalHome) ic.lookup("local/AdvancedSearch");
      AdvancedSearchLocal remote = (AdvancedSearchLocal) home.create();
      remote.setDataSource(dataSource);
      ArrayList resultsIDs = new ArrayList();
      resultsIDs.addAll(remote.performSearch(individualID,searchVO));
View Full Code Here

    // In-case if we are updating the individual's List then we must have to update the entity's List ID
    // same thing for entity.
    if(displayName != null && displayName.equals("Marketing List") && queryTableID != 0){
     
      //intialize the ContactHelperLocal
      ContactHelperLocalHome contactHelperLocalHome = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
      ContactHelperLocal contactHelperLocal =  contactHelperLocalHome.create();
      contactHelperLocal.setDataSource(this.dataSource);

      ArrayList recordIDs= new ArrayList();     
      for (int i = 0; i < resultsIDs.size(); i++)
View Full Code Here

  public void duplicateTicket(int userId, TicketVO tv)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.duplicateTicket(userId, tv);
      ctx.getUserTransaction().commit();
View Full Code Here

  {
    int tktID = 0;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      tktID = remote.addTicket(userId, tv);
      ctx.getUserTransaction().commit();
View Full Code Here

  public int addThread(int userId, ThreadVO thvo)
  {
    int returnCode = 1;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.addThread(userId, thvo);
      returnCode = 0;
    } catch (Exception e) {
View Full Code Here

  public ThreadVO getThread(int userId, int threadId)
  {
    ThreadVO thVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      ctx.getUserTransaction().begin();
      remote.setDataSource(this.dataSource);
      thVO = remote.getThread(userId, threadId);
      ctx.getUserTransaction().commit();
View Full Code Here

  public TicketVO getTicketBasicRelations(int userId, int ticketId) throws TicketException, AuthorizationFailedException
  {
    TicketVO tv = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TicketLocalHome home = (TicketLocalHome) ic.lookup("local/Ticket");
      TicketLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      tv = remote.getTicketBasicRelations(userId, ticketId);
    } catch (CreateException ce) {
      throw new EJBException(ce);
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.