Examples of InitialContext


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

Examples of org.apache.avalon.repository.provider.InitialContext

        super( name );
    }

    public void testRepositoryBootstrap() throws Exception
    {
        InitialContext context =
          new DefaultInitialContext(
            getMavenRepositoryDirectory(),
            getDefaultHosts() );

        assertEquals(
          "cache",
          context.getInitialCacheDirectory(),
          getMavenRepositoryDirectory() );

        String[] defaults = getDefaultHosts();
        String[] hosts = context.getInitialHosts();
        assertNotNull( "hosts", hosts );
        assertEquals( "hosts count", defaults.length, hosts.length );

        for( int i=0; i<defaults.length; i++ )
        {
            assertEquals(
              "host", defaults[i], hosts[i] );
        }

        Factory factory = context.getInitialFactory();
        assertNotNull( factory );

        CacheManager manager = (CacheManager) factory.create() ;
        assertNotNull( manager ) ;
  
View Full Code Here

Examples of org.apache.commons.jxpath.ri.axes.InitialContext

        EvalContext rootContext;
        if (isAbsolute()) {
            rootContext = context.getRootContext().getAbsoluteRootContext();
        }
        else {
            rootContext = new InitialContext(context);
        }
        return evalSteps(rootContext);
    }
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.