Package javax.ejb

Examples of javax.ejb.MessageDrivenContext


            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 );
View Full Code Here


            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);
View Full Code Here

    /**
     * Set the associated message driven context. The container calls this method
     * after the instance creation.
     */
    public MessageDrivenContext getMessageDrivenContext() throws EJBException {
        MessageDrivenContext ejbContext = null;
        try {
            ejbContext = (MessageDrivenContext) new InitialContext().lookup("java:comp/EJBContext");
        } catch (NamingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

            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);
View Full Code Here

            try{
                InitialContext ctx = new InitialContext();
                Assert.assertNotNull("The InitialContext is null", ctx);

                // lookup in enc
                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
                EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
                Assert.assertNotNull("The MessageDrivenContext got from java:comp/EJBContext is null ", ejbCtx );
View Full Code Here

            try{
                InitialContext ctx = new InitialContext();
                Assert.assertNotNull("The InitialContext is null", ctx);

                // lookup in enc
                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
                EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
                Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx );
View Full Code Here

TOP

Related Classes of javax.ejb.MessageDrivenContext

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.