Package org.jboss.test.messaging.jms

Source Code of org.jboss.test.messaging.jms.AOPStackInitializationTest

/**
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.test.messaging.jms;

import org.jboss.test.messaging.MessagingTestCase;
import org.jboss.test.messaging.tools.ServerManagement;

import javax.naming.InitialContext;
import javax.jms.ConnectionFactory;
import javax.jms.Connection;

/**
* Tests the very first server invocation, when the client-side AOP stack is initialized.
*
* @author <a href="mailto:ovidiu@jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision: 1843 $</tt>
*
* $Id: JMSTest.java 1843 2006-12-21 23:41:19Z timfox $
*/
public class AOPStackInitializationTest extends MessagingTestCase
{
   // Constants -----------------------------------------------------

   // Static --------------------------------------------------------

   // Attributes ----------------------------------------------------

   InitialContext ic;

   // Constructors --------------------------------------------------

   public AOPStackInitializationTest(String name)
   {
      super(name);
   }

   // Public --------------------------------------------------------

   public void testSimpleInitialization() throws Exception
   {
      ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");

      Connection conn = cf.createConnection();

      conn.close();
   }

   // Package protected ---------------------------------------------

   // Protected -----------------------------------------------------

   protected void setUp() throws Exception
   {
      super.setUp();

      ServerManagement.start("all");

      ic = new InitialContext(ServerManagement.getJNDIEnvironment());

      log.debug("setup done");
   }

   protected void tearDown() throws Exception
   {
      ic.close();

      ServerManagement.stop();

      super.tearDown();
   }

   // Private -------------------------------------------------------

   // Inner classes -------------------------------------------------

}
TOP

Related Classes of org.jboss.test.messaging.jms.AOPStackInitializationTest

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.