Package javax.naming

Examples of javax.naming.InitialContext.lookup()


  public static boolean isModuleVisible(String moduleName, int individualId, String dataSource)
  {
    boolean retVal = false;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.isModuleVisible(moduleName, individualId);
    } catch (Exception e) {
      logger.error("[isModuleVisible]: Exception", e);
View Full Code Here


  public static Object replaceVO(Object objDBVO, Object objUIVO, String moduleName, int individualId, String dataSource)
  {
    HashMap hm = new HashMap();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);

      hm = local.getNoneRightFieldMethod(moduleName, individualId);
      if (hm != null) {
View Full Code Here

  public static ModuleFieldRightMatrix getUserModuleRight(String moduleName, int individualId, boolean byListCol, String dataSource)
  {
    ModuleFieldRightMatrix retVal = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.getUserSecurityProfileMatrix(moduleName, individualId, byListCol);
    } catch (Exception e) {
      logger.error("[getUserModuleRight]: Exception", e);
View Full Code Here

  public static boolean canPerformRecordOperation(int indId, String moduleName, int recordId, int privilegeLevel, String dataSource)
  {
    boolean retVal = false;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.canPerformRecordOperation(indId, moduleName, recordId, privilegeLevel);
    } catch (Exception e) {
      logger.error("[canPerformRecordOperation]: Exception", e);
View Full Code Here

    IndividualVO individualVO = new IndividualVO();
    try
    {
      InitialContext ic = new InitialContext();
      IndividualLocalHome home = (IndividualLocalHome)
        ic.lookup("local/Individual");
      IndividualLocal remote =  home.findByPrimaryKey(
        new IndividualPK(individualID, this.dataSource));
      individualVO = remote.getIndividualVOWithBasicReferences();
    } //end of try block
    catch (Exception e)
View Full Code Here

  private UserTransaction getUserTransaction()
      throws NamingException
  {
    InitialContext ctx = new InitialContext();
    UserTransaction tx = (UserTransaction)ctx.lookup("UserTransaction");
    return tx;
  }

  public Element invoke(String operation, Element mesg) throws Exception
  {
View Full Code Here

  public ProcessEnginePluginImpl()
  {
    try
    {
      InitialContext ctx = new InitialContext();
      engine = (BPELEngine)ctx.lookup("bpel/Engine");
    }
    catch (NamingException e)
    {
      throw new RuntimeException("Failed to initialize BPEL engine");
    }
View Full Code Here

  }

  private BPELEngine getEngine() {
    try {
      InitialContext ctx = new InitialContext();
      return (BPELEngine)ctx.lookup("bpel/Engine");
    } catch (NamingException e) {
      throw new RuntimeException("Failed to initialize BPEL engine");
    }
  }
}
View Full Code Here

 
  public ProcessHistoryPluginImpl() {
      try
      {
        InitialContext ctx = new InitialContext();       
        EntityManagerFactory emf  = (EntityManagerFactory)ctx.lookup("bpel/EntityManagerFactory");
        if (null == emf) {
          throw new IllegalStateException("EntityManagerFactory is null");
        }
        ds = new DefaultBPAFDataSource(emf);
      }
View Full Code Here

 
  private org.jboss.cache.Cache cache;
 
  public void start() throws Exception {
    Context ctx = new InitialContext();
    cacheManager = (CacheManager) ctx.lookup("java:CacheManager");
    cache = cacheManager.getCache("riftsaw-cache", true);
    cache.start();
  }
 
  public <K, V> Cache<K, V> createCache() {
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.