コード例 #1
0
  @Test
  public void testCreateTransactedSession() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext(JMSContext.SESSION_TRANSACTED);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #2
0
  @Test
  public void createContext() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext();
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #3
0
  @Test
  public void testCreateContextClientAckSession() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext(JMSContext.CLIENT_ACKNOWLEDGE);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #4
0
  @Test
  public void testCreateContextCredentialsAndTransactedSession() throws Exception {
    final String username = "******";
    final String password = "******";

    JMSContext context =
        jms2ConnectionFactory.createContext(username, password, JMSContext.SESSION_TRANSACTED);
    assertNotNull(context);
  }
コード例 #5
0
  @Test
  public void testCreateContextWithCredentials() throws Exception {

    final String username = "******";
    final String password = "******";

    JMSContext context = jms2ConnectionFactory.createContext(username, password);
    assertNotNull(context);
  }
コード例 #6
0
  @Test
  public void testCreateConnectionwithCredentials() throws Exception {
    final String username = "******";
    final String password = "******";

    Connection conn = jms2ConnectionFactory.createConnection(username, password);
    assertNotNull(conn);
    assertEquals(Jms2Connection.class, conn.getClass());
  }
コード例 #7
0
  @Test
  public void testCreateContextCredentialsAndClientAckSession() throws Exception {
    final String username = "******";
    final String password = "******";

    JMSContext context =
        jms2ConnectionFactory.createContext(username, password, JMSContext.CLIENT_ACKNOWLEDGE);
    assertNotNull(context);
    assertEquals(Jms2Context.class, context.getClass());
  }
コード例 #8
0
  @Test
  public void testCreateContext() throws Exception {

    JMSContext context = jms2ConnectionFactory.createContext();
    assertNotNull(context);
  }
コード例 #9
0
 @Test
 public void testCreateConnection() throws Exception {
   Connection conn = jms2ConnectionFactory.createConnection();
   assertNotNull(conn);
   assertEquals(Jms2Connection.class, conn.getClass());
 }