Package org.apache.jmeter.ejb.jndi.config

Examples of org.apache.jmeter.ejb.jndi.config.JndiConfig


  protected static Set addableList;

  public JndiTestSample()
  {
    defaultJndiConfig = new JndiConfig();
  }
View Full Code Here


    contextLookupRes.putValue(SampleResult.DISPLAY_NAME, "Context Lookup");
    SampleResult lookupRes = new SampleResult();
    SampleResult homeMethodRes = null;
    SampleResult remoteMethodRes = null;
    Hashtable ht = new Hashtable();
    JndiConfig jndiConfig = null;
    InitialContext ctx = null;
    try
    {
      jndiConfig = (JndiConfig)e.getConfigElement(JndiConfig.class);
      // check if InitialContext is already obtained previously
      ctx = jndiConfig.getInitialContext();
      if(ctx == null)
      {
        // setup the hashtable
        for(int i = 0 ; i < JndiConfig.JNDI_PROPS.length; i++)
        {
          String value = jndiConfig.getValue(i);
          if(value != null)
          {
            if(catClass.isDebugEnabled())
            {
              catClass.debug("sample1 : JNDI env - " +
    JndiConfig.JNDI_PROPS[i] + " = " + value);
            }
            ht.put(JndiConfig.JNDI_PROPS[i], value);
          }
        }
        // initialize initial context
        start = System.currentTimeMillis();
        ctx = new InitialContext(ht);
        end = System.currentTimeMillis();
        catClass.info("sample1 : Got initial context");
        // store the initial context for reuse
        jndiConfig.setInitialContext(ctx);
      }
      // set the initial context lookup time
      ctxTime = end - start;
      contextLookupRes.setTime(ctxTime);
View Full Code Here

  protected static Set addableList;

  public JndiTestSample()
  {
    defaultJndiConfig = new JndiConfig();
  }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.ejb.jndi.config.JndiConfig

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.