Package javax.naming

Examples of javax.naming.InitialContext


  public TaskVO getTask(int taskId, int userId)
  {
    TaskVO taskVO = null;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      TaskLocalHome home = (TaskLocalHome)ic.lookup("local/Task");
      TaskLocal remote = (TaskLocal)home.create();
      remote.setDataSource(this.dataSource);

      taskVO = remote.getTask(taskId, userId);
    } catch (Exception e) {
View Full Code Here


  }

  public int addTimeSlip(int userId, TimeSlipVO tsvo)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TimeSlipLocalHome home = (TimeSlipLocalHome)ic.lookup("local/TimeSlip");
      TimeSlipLocal remote = (TimeSlipLocal)home.create();
      remote.setDataSource(this.dataSource);

      return remote.addTimeSlip(userId, tsvo);
    } catch (Exception e) {
View Full Code Here

  }

  public void deleteTimeSlip(int timeslipID)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TimeSlipLocalHome home = (TimeSlipLocalHome)ic.lookup("local/TimeSlip");
      TimeSlipLocal remote = (TimeSlipLocal)home.create();
      remote.setDataSource(this.dataSource);

      remote.deleteTimeSlip(timeslipID);
    } catch (CreateException ce) {
View Full Code Here

  public TimeSlipList getAllTimeSlipList(int userID, HashMap info)
  {
    TimeSlipList timeSlipList = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      ProjectListsLocalHome home = (ProjectListsLocalHome)ic.lookup("local/ProjectLists");
      ProjectListsLocal remote = (ProjectListsLocal)home.create();
      remote.setDataSource(this.dataSource);
      timeSlipList = (TimeSlipList)remote.getAllTimeSlipList(userID, info);
    } catch (Exception e) {
      System.out.println("[Exception][ProjectFacadeEJB.getAllTimeSlipList] Exception Thrown: " + e);
View Full Code Here

  }

  public void duplicateTimeSlip(int userId, int timeSlipId)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TimeSlipLocalHome home = (TimeSlipLocalHome)ic.lookup("local/TimeSlip");
      TimeSlipLocal remote = (TimeSlipLocal)home.create();
      remote.setDataSource(this.dataSource);

      remote.duplicateTimeSlip(userId, timeSlipId);
    } catch (Exception e) {
View Full Code Here

  public TimeSlipVO getTimeSlip(int timeSlipId, int userId)
  {
    TimeSlipVO tVO = null;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      TimeSlipLocalHome home = (TimeSlipLocalHome)ic.lookup("local/TimeSlip");
      TimeSlipLocal remote = (TimeSlipLocal)home.create();
      remote.setDataSource(this.dataSource);

      tVO = remote.getTimeSlip(timeSlipId, userId);
    } catch (Exception e) {
View Full Code Here

  }

  public void updateTimeSlip(int userId, TimeSlipVO tsvo)
  {
    try {
      InitialContext ic = CVUtility.getInitialContext();
      TimeSlipLocalHome home = (TimeSlipLocalHome)ic.lookup("local/TimeSlip");
      TimeSlipLocal remote = (TimeSlipLocal)home.create();
      remote.setDataSource(this.dataSource);

      remote.updateTimeSlip(userId, tsvo);
    } catch (Exception e) {
View Full Code Here

  public TimeSlipList getTimeSlipListForProject(int userId, int projectId, HashMap info)
  {
    TimeSlipList timeSlipList = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      ProjectListsLocalHome home = (ProjectListsLocalHome)ic.lookup("local/ProjectLists");
      ProjectListsLocal remote = (ProjectListsLocal)home.create();
      remote.setDataSource(this.dataSource);
      timeSlipList = (TimeSlipList)remote.getTimeSlipListForProject(userId, projectId, info);
    } catch (Exception e) {
      System.out
View Full Code Here

  public TimeSlipList getTimeSlipListForProject(int userId, int projectId)
  {
    TimeSlipList timeSlipList = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      ProjectListsLocalHome home = (ProjectListsLocalHome)ic.lookup("local/ProjectLists");
      ProjectListsLocal remote = (ProjectListsLocal)home.create();
      remote.setDataSource(this.dataSource);
      timeSlipList = (TimeSlipList)remote.getTimeSlipListForProject(userId, projectId);
    } catch (Exception e) {
      System.out
View Full Code Here

   */
  public String getProjectName(int ProjectID)
  {
    String ProjectName = "";
    try {
      InitialContext ic = CVUtility.getInitialContext();
      ProjectLocalHome home = (ProjectLocalHome)ic.lookup("local/Project");
      ProjectLocal remote = (ProjectLocal)home.create();
      remote.setDataSource(this.dataSource);
      ProjectName = remote.getProjectName(ProjectID);
    } catch (Exception e) {
      System.out.println("[Exception][ProjectFacadeEJB.getProjectName] Exception Thrown: " + e);
View Full Code Here

TOP

Related Classes of javax.naming.InitialContext

Copyright © 2018 www.massapicom. 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.