当前位置: 首页>>代码示例>>Java>>正文


Java MessageDrivenContext类代码示例

本文整理汇总了Java中javax.ejb.MessageDrivenContext的典型用法代码示例。如果您正苦于以下问题:Java MessageDrivenContext类的具体用法?Java MessageDrivenContext怎么用?Java MessageDrivenContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MessageDrivenContext类属于javax.ejb包,在下文中一共展示了MessageDrivenContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: lookupMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void lookupMessageDrivenContext() throws TestFailureException {
    try {
        try {
            final InitialContext ctx = new InitialContext();
            Assert.assertNotNull("The InitialContext is null", ctx);

            // lookup in enc
            final MessageDrivenContext sctx = (MessageDrivenContext) ctx.lookup("java:comp/env/mdbcontext");
            Assert.assertNotNull("The MessageDrivenContext got from java:comp/env/mdbcontext is null", sctx);

            // lookup using global name
            final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
            Assert.assertNotNull("The MessageDrivenContext got from java:comp/EJBContext is null ", ejbCtx);

            // verify context was set via legacy set method
            Assert.assertNotNull("The MessageDrivenContext is null from setter method", mdbContext);
        } catch (final Exception e) {
            Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
    } catch (final AssertionFailedError afe) {
        throw new TestFailureException(afe);
    }

}
 
开发者ID:apache,项目名称:tomee,代码行数:26,代码来源:ContextLookupMdbBean.java

示例2: lookupMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void lookupMessageDrivenContext() throws TestFailureException {
    try {
        try {
            final InitialContext ctx = new InitialContext();
            Assert.assertNotNull("The InitialContext is null", ctx);

            // lookup in enc
            final MessageDrivenContext sctx = (MessageDrivenContext) ctx.lookup("java:comp/env/mdbcontext");
            Assert.assertNotNull("The MessageDrivenContext got from java:comp/env/mdbcontext is null", sctx);

            // lookup using global name
            final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
            Assert.assertNotNull("The MessageDrivenContext got from java:comp/EJBContext is null ", ejbCtx);
        } catch (final Exception e) {
            Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
    } catch (final AssertionFailedError afe) {
        throw new TestFailureException(afe);
    }

}
 
开发者ID:apache,项目名称:tomee,代码行数:22,代码来源:ContextLookupMdbPojoBean.java

示例3: lookupMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void lookupMessageDrivenContext() throws TestFailureException {
    try {
        try {
            final InitialContext ctx = new InitialContext();
            Assert.assertNotNull("The InitialContext is null", ctx);

            // lookup in enc
            final MessageDrivenContext messageDrivenContext = (MessageDrivenContext) ctx.lookup("java:comp/env/mdbcontext");
            Assert.assertNotNull("The SessionContext got from java:comp/env/mdbcontext is null", messageDrivenContext);

            // lookup using global name
            final EJBContext ejbCtx = (EJBContext) ctx.lookup("java:comp/EJBContext");
            Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx);

            // verify context was set via legacy set method
            Assert.assertNotNull("The MdbContext is null from setter method", mdbContext);
        } catch (final Exception e) {
            Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
    } catch (final AssertionFailedError afe) {
        throw new TestFailureException(afe);
    }

}
 
开发者ID:apache,项目名称:tomee,代码行数:26,代码来源:EncMdbBean.java

示例4: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
	this.ctx = ctx;
	try {
		Context initialCtx = new InitialContext();
		homeCtx = (Context) initialCtx.lookup("java:comp/env");
	} catch(NamingException e) {
		e.printStackTrace();
		throw new EJBException(e);
	}
}
 
开发者ID:wesleyegberto,项目名称:study-ocbcd,代码行数:11,代码来源:DepositProcessBean.java

示例5: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void setMessageDrivenContext(final MessageDrivenContext ctx) throws EJBException {
    this.mdbContext = ctx;
    try {
        final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
        mdbInvoker = new MdbInvoker(connectionFactory, this);
    } catch (final Exception e) {
        throw new EJBException(e);
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:ContextLookupMdbBean.java

示例6: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void setMessageDrivenContext(final MessageDrivenContext ctx) throws EJBException {
    this.mdbContext = ctx;
    testAllowedOperations("setMessageDrivenContext");
    try {
        final ConnectionFactory connectionFactory = (ConnectionFactory) new InitialContext().lookup("java:comp/env/jms");
        mdbInvoker = new MdbInvoker(connectionFactory, this);
    } catch (final Exception e) {
        throw new EJBException(e);
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:12,代码来源:BasicMdbBean.java

示例7: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void setMessageDrivenContext(final MessageDrivenContext ctx) throws EJBException {
    this.mdbContext = ctx;
    try {
        mdbInvoker = new MdbInvoker(connectionFactory, this);
    } catch (final Exception e) {
        throw new EJBException(e);
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:10,代码来源:InterceptorMdbBean.java

示例8: isPrivateReference

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
private <R extends JndiReference> boolean isPrivateReference(final R a) {
    if (!isResourceRef(a)) {
        return false;
    }

    final Class[] types = {EJBContext.class, EntityContext.class, SessionContext.class, MessageDrivenContext.class, UserTransaction.class};

    for (final Class type : types) {
        if (type.getName().equals(a.getType())) {
            return true;
        }
    }

    return false;
}
 
开发者ID:apache,项目名称:tomee,代码行数:16,代码来源:MergeWebappJndiContext.java

示例9: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
	this.ctx = ctx;
	received = true;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:6,代码来源:OldSpecsWorkingBean.java

示例10: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
	this.messageDrivenContext = ctx;
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:4,代码来源:AvisadorInmediatoFacadeEJB.java

示例11: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext) throws EJBException {
    // System.out.println(TerminalMDB.class.getName() + "::setMessageDrivenContext invoked");
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:4,代码来源:TerminalMDB.java

示例12: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
@Override
public void setMessageDrivenContext(MessageDrivenContext arg0)
	throws EJBException {
	this.context = arg0;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:6,代码来源:ValidadorJMSListener.java

示例13: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext) {
	super.setMessageDrivenContext(messageDrivenContext);
	setBeanFactoryLocator(ContextSingletonBeanFactoryLocator.getInstance("classpath*:beanRefContext.xml"));
	setBeanFactoryLocatorKey("applicationContext-main");
}
 
开发者ID:8090boy,项目名称:gomall.la,代码行数:6,代码来源:BaseMDB.java

示例14: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException {
    mdbContext = ctx;
}
 
开发者ID:lanimall,项目名称:messaging-samples,代码行数:4,代码来源:BaseProcessingConsumer.java

示例15: setMessageDrivenContext

import javax.ejb.MessageDrivenContext; //导入依赖的package包/类
public void setMessageDrivenContext(MessageDrivenContext ctx)
    throws EJBException {
  this.mdbCtx = ctx;
}
 
开发者ID:ibm-messaging,项目名称:mq-wlm-client,代码行数:5,代码来源:WLMMDB.java


注:本文中的javax.ejb.MessageDrivenContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。