AQ driven MDB in OC4J R2?

Hi,
Does anyone know if the full version of OC4J R2 will support Message Driven Beans instantiated from an AQ? I can see no mention of this in the preview version. If so what is the release date?
Cheers,
Matt

Hi,
the upcoming version will support AQ as a JMS provider.
Thanks,
Andy
Hi,
Does anyone know if the full version of OC4J R2 will support Message Driven Beans instantiated from an AQ? I can see no mention of this in the preview version. If so what is the release date?
Cheers,
Matt

Similar Messages

  • MDB on OC4J consuming from a forign JMS Server

    I would like to create MDBs and deploy them to OC4J. But these MDBs need to consume messages from non-AQ JMS Servers. We are currently using MDBs in OC4J that consume from Oracle AQ using resource adapters. But we now have a need to use other JMS servers such as OpenJMS and JbossMQ.
    I have read documents that seem to indicate
    Message-driven beans are supported only for Oracle JMS.
    Does this mean I cannot create a resource adapter for JbossMQ and deploy a MDB to OC4J that consumes from this JMS Server?
    Any help would be most appreciated!
    Thanks, Paul.

    Anybody has faced similar issue?

  • Porting EJB 3 MDB from OC4J to WLS

    Posting this again since my last post didn't seem to take.
    I get the following three deployment error messages when attempting to deploy an application to WebLogic Server 10.3 technical preview. The problem is centered around my deployment of an EJB 3 message driven bean.
    1. An error occurred during activation of changes, please see the log for details.
    2. Exception preparing module: EJBModule(EngineEjb.jar) Unable to deploy EJB: Requestor from EngineEjb.jar: [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation. at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:246) at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1013) at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:907) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1211) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:387) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:381) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:517) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    3. Substituted for missing class [EJB - 11026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment. weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'jms/demoQueue' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
    My MDB uses an annotation like the following:
    @MessageDriven(mappedName = "jms/demoQueue", name = "MyMDB",
    activationConfig =
    @ActivationConfigProperty(propertyName = "destinationType",
    propertyValue = "javax.jms.Queue")
    @ActivationConfigProperty(propertyName = "messageSelector", propertyValue =
    "RECIPIENT = 'MyRecipient'")
    Earlier, I did create a JMS Module named demoQueue with the following resources:
    Name Type JNDI Name
    testQueue Queue jms/demoQueue
    ConnectionFactory-0 Connection Factory jms/QueueConnectionFactory
    Any suggestions to fix the WLS deployment error?
    For continuing compatibility with my OC4J deployment, I would like to continue using a connection factory with the following JNDI name "jms/QueueConnectionFactory" shown above.
    So I plan to add the following properties to the @MessageDriven annotation above. These are needed to continue working with our OC4J deployment. However, my primary concern is to get this MDB working with WLS. Does this strategy seem reasonable for allowing deployment to both OC4J and WLS?
    @ActivationConfigProperty(propertyName = "connectionFactoryJndiName",
    propertyValue =
    "jms/QueueConnectionFactory") ,
    @ActivationConfigProperty(propertyName = "destinationName", propertyValue =
    "jms/demoQueue")
    Thanks,
    Travis

    Travis, you pose a very good question. If I understand your goal, you would like to use code that compiles and works in OC4J and WLS. For example, you want to use javax.ejb.MessageDriven instead of weblogic.ejbgen.MessageDriven.
    Using something like mappedName as it is referred to here allows you specify the JNDI name in WLS if it is not defined elsewhere, but it appears to be specific to the WLS implementation.
    I've seen several other questions posed about finding all of the available ActivationConfigProperty name / value pairs and I have been unable to find it myself.
    I tried several permutations of annotations, and I can't figure out why something like this would even work, but it does. The mapped name is my JNDI name, but I never specify that it is a javax.jms.Queue or which connection factory to use. How does WLS figure that out?
    @MessageDriven(     
         mappedName = "exampleQueue", name = "HelloWorldMDB"
    public class HelloWorldMDB implements MessageListener {
         @Override
         @TransactionAttribute(value = javax.ejb.TransactionAttributeType.REQUIRED)
         public void onMessage(Message message) {
              System.out.println( "received message " + message );
    }This is a good question for support as the documentation seems to be incomplete here.

  • OC4J & MDB Deployment Problems

    I really am at a loss here. This is the error I get when I try to deploy a MDB to OC4J.
    [May 23, 2007 7:59:43 PM] Application Deployer for eaDUR STARTS.
    [May 23, 2007 7:59:43 PM] Copy the archive to D:\product\10.1.3\OracleAS\j2ee\InternalApps\applications\eaDUR.ear
    [May 23, 2007 7:59:43 PM] Initialize D:\product\10.1.3\OracleAS\j2ee\InternalApps\applications\eaDUR.ear begins...
    [May 23, 2007 7:59:43 PM] Removing everything under: D:\product\10.1.3\OracleAS\j2ee\InternalApps\applications\eaDUR
    [May 23, 2007 7:59:43 PM] Unpacking eaDUR.ear
    [May 23, 2007 7:59:44 PM] Done unpacking eaDUR.ear
    [May 23, 2007 7:59:44 PM] Initialize D:\product\10.1.3\OracleAS\j2ee\InternalApps\applications\eaDUR.ear ends...
    [May 23, 2007 7:59:44 PM] Starting application : eaDUR
    [May 23, 2007 7:59:44 PM] Initializing ClassLoader(s)
    [May 23, 2007 7:59:44 PM] Initializing EJB container
    [May 23, 2007 7:59:44 PM] Loading connector(s)
    [May 23, 2007 7:59:44 PM] Starting up resource adapters
    [May 23, 2007 7:59:44 PM] Processing EJB module: DURAppEJB.jar
    [May 23, 2007 7:59:44 PM] Compiling EJB generated code
    [May 23, 2007 7:59:44 PM] application : eaDUR is in failed state
    [May 23, 2007 7:59:44 PM] Operation failed with error: No javax.jms.Destination found at the specified destination-location (java:comp/resource/JMSUSERRP/Queues/DUR_QUEUE) for MessageDrivenBean RequestProcessorMDB
    My deployment descriptors are as follows.
    Here is my application.xml
    <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <display-name>DURApp</display-name>
    <module>
    <ejb>DURAppEJB.jar</ejb>
    </module>
    </application>
    Here is my orion-application.xml:
    <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd">
    <resource-provider class="oracle.jms.OjmsContext" name="JMSUSERRP">
    <description>OJMS Context Using a datasource</description>
    <property name="datasource" value="jdbc/durDS"></property>
    </resource-provider>
    </orion-application>
    Here is my ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
    version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee">
    <enterprise-beans>
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>RequestProcessorMDB</display-name>
    <ejb-name>RequestProcessorMDB</ejb-name>
    <ejb-class>com.accredohealth.dur.mdb.RequestProcessorMDBean</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-destination-type>javax.jms.Queue</message-destination-type>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>RequestProcessorBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is my orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
    <enterprise-beans>
    <session-deployment name="RequestProcessorBean"/>
    <message-driven-deployment name="RequestProcessorMDB"
    connection-factory-location="java:comp/resource/JMSUSERRP/QueueConnectionFactories/DUR_REQUEST_QT"
    max-instances="5"
    min-instances="5"
    listener-threads="5"
    destination-location="java:comp/resource/JMSUSERRP/Queues/DUR_QUEUE"
    dequeue-retry-count="3"
    transaction-timeout="20"/>
    </enterprise-beans>
    <assembly-descriptor/>
    </orion-ejb-jar>

    Ok, I was looking in the actual log file for the message when they were actually come out onto the console that starts up whne you start the server... problem solved.

  • One Topic, One MDB, Multiple Deployments?

              I want to deploy EJBs representing multiple applications in a single server. Each
              of these applications has different reasons for wanting to receive messages sent
              to a particular single system-wide "event" topic. Ideally, I would develop a single
              MDB class that each application would deploy with its own message selector(s). This
              sounds like it should work -- but then I saw this in section 4.11 of the JMS Performance
              Guide:
              "Note: Topic-driven MDBs have vendor-specific semantics. In WebLogic, MDBs that listen
              on a
              topic currently receive one message per deployment [as of 6.0SP1]. If you have an
              MDB with
              multiple instances on a single server listening on a topic, it will receive only
              one copy of a
              published message regardless of the number of instances. If you have an MDB deployed
              across
              multiple machines listening on a topic, then each deployment will receive a copy
              of any published
              message on that topic. In other words, you will get multiple copies of the message
              distributed
              evenly once to each of your MDB deployments."
              Does this mean that I can't do what I described above?
              TIA,
              Mark
              

    I think WL is giving you the behavior you are looking for. The same MDB pool with multiple
              instances will only receive one copy of the message. Different MDB pools will each receive
              their own copy of the message, regardless of what server they exist on.
              For example,
              A1: MDB pool with selector x=a,
              A2: MDB pool with selector x=a
              B: MDB pool with selector x=b
              AB: MDB pool with selector x=a OR x=b
              publish msg property x = a:
              pool A1 will receive one copy of msg and give to one of its instances
              pool A2 will receive one copy of msg and give to one of its instances
              pool AB will receive one copy of msg and give to one of its instances
              pool B will NOT receive the msg
              Tom
              Mark Shaffer wrote:
              > I want to deploy EJBs representing multiple applications in a single server. Each
              > of these applications has different reasons for wanting to receive messages sent
              > to a particular single system-wide "event" topic. Ideally, I would develop a single
              > MDB class that each application would deploy with its own message selector(s). This
              > sounds like it should work -- but then I saw this in section 4.11 of the JMS Performance
              > Guide:
              >
              > "Note: Topic-driven MDBs have vendor-specific semantics. In WebLogic, MDBs that listen
              > on a
              > topic currently receive one message per deployment [as of 6.0SP1]. If you have an
              > MDB with
              > multiple instances on a single server listening on a topic, it will receive only
              > one copy of a
              > published message regardless of the number of instances. If you have an MDB deployed
              > across
              > multiple machines listening on a topic, then each deployment will receive a copy
              > of any published
              > message on that topic. In other words, you will get multiple copies of the message
              > distributed
              > evenly once to each of your MDB deployments."
              >
              > Does this mean that I can't do what I described above?
              >
              > TIA,
              >
              > Mark
              

  • OC4J memory error for substantial app

    In loading a substantial BC4J driven application on OC4J I receive :
    500 Internal Server Error
    java.lang.OutOfMemoryError
    at oracle.xml.parser.v2.XMLReader.setEncoding(XMLReader.java, Compiled Code)
    at oracle.xml.parser.v2.XMLCharReader.<init>(XMLCharReader.java, Compiled Code)
    at oracle.xml.parser.v2.XMLReader.setEncoding(XMLReader.java, Compiled Code)
    at oracle.xml.parser.v2.XMLReader.checkXMLDecl(XMLReader.java, Compiled Code)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java, Compiled Code)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java, Compiled Code)
    at oracle.jbo.server.MetaObjectManager.loadLazyObject(MetaObjectManager.java, Compiled Code)
    at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java, Compiled Code)
    at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java, Compiled Code)
    at oracle.jbo.server.ApplicationModuleImpl.createViewObject(ApplicationModuleImpl.java, Compiled Code)
    at oracle.jbo.server.ApplicationModuleDefImpl.loadComponents(ApplicationModuleDefImpl.java, Compiled Code)
    at oracle.jbo.server.ApplicationModuleImpl.createRootApplicationModule(ApplicationModuleImpl.java:263)
    at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:85)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.createNewInstance(ApplicationPoolImpl.java, Compiled Code)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.checkout(ApplicationPoolImpl.java, Compiled Code)
    at oracle.jbo.html.jsp.JSPApplicationRegistry.internalGetAppModuleInstance(JSPApplicationRegistry.java:463)
    at oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(JSPApplicationRegistry.java:377)
    at oracle.jdeveloper.html.DataWebBeanImpl.internalInitialize(DataWebBeanImpl.java:404)
    at oracle.jdeveloper.html.WebBeanImpl.initialize(WebBeanImpl.java:56)
    at oracle.jdeveloper.html.DataWebBeanImpl.initialize(DataWebBeanImpl.java:360)
    at oracle.jdeveloper.html.DataWebBeanImpl.initialize(DataWebBeanImpl.java:391)
    at /fast/forum/jsp/forum_top.jsp._jspService(/fast/forum/jsp/forum_top.jsp.java:109) (JSP page line 53)
    at com.orionserver[Oracle9iAS (1.0.2.2) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:54)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpApplication.serviceJSP(HttpApplication.java:5458)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.JSPServlet.service(JSPServlet.java:31)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java, Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java, Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java, Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java, Compiled Code)
    There is plenty of server memory free, which means I need to boost the footprint of the OC4J server I think. Please confirm, and what swith would I use?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Mark Jumaga ([email protected]):
    Hello VKansal
    I consider it absurd that a billion dollar corporation such as Oracle has to rely on the oem purchase of the Orion product to save it's java ass. It consider it doubly absurd that the subsequent marketing push of said product can at once be so full of hype and so lacking in technical support as to be the mark of a corporation gone mad.
    Thankyou for your "Orion support" response to my problem, a problem completely ignored by The J2EE "team" at Oracle.
    Did you know that this OC4J is at once god's gift to J2EE deployment and also "early adopter technology" without support?
    Did you know that Oracle Marketing is pushing OC4J as an answer to the market leader BEA, and yet everywhere on this forum there are problems about deployment that are unanswered by tech support, answered with the "unsupported" tag line, or answered by links to documentation that is incorrect?
    Kinda makes you wonder if the 20 thousand dollar price tag to get the OEM'd Orion server in 9ias, which originally sold for 1500$ with better documentation from Orion, is a good purchase decision.
    NOT that my complete waste of time bashing out these details isn't A LOT of fun while I'm struggling to deliver production ready code under blazing time to market considerations! NO! I LOVE TO WASTE MY TIME, AND MY CLIENTS MONEY! THAT'S HOW WE'RE ALL SUCCESSFULL IN THIS BUSINESS, RIGHT?
    <HR></BLOCKQUOTE>
    Mark -
    Perhaps Oracle support doesn't want to here this, but the best information for OCJ4 is available either by scanning the mailing list at www.orionserver.com or looking at www.orionsupport.com - a site developed by users of Orion with no actual association with the vompany. I've been working with the app-server for over a year now and have certainly been frustrated at the lack of documentation - and of course Oracle hasn't improved it. Oracle should have spent much more time training their technical staff before giving it to the marketing chumps to run with. I believe that the move of Oracle and Orion is a good one from a technical perspective however - I am over the major bump in the Orion learning curve and I absolutely love the product - but I'm not sure that the Oracle staff are over that (what can be) tough first part of the curve. Hopefully they are all hunkered down with Karl and Magnus from Orion trying to learn all the required stuff.
    Cheers
    Ray

  • MDB Pooling

    Folks,
    What impact does the maxInstances attribute have on MDBs in OC4J 10g. Consider the following scenario.....
    I have 100 messages that come on a queue but I want no more than 10 messages to be processed at any instant. If I set the maxInstances=10 for the MDB Does the container instantiate a maximum of 10 MDBs in the pool and allow only these instances to service the 100 messages or does it exceed the maxInstances=10 and instantiate more MDBs to service the 100 messages?
    Regards,
    Hyder

    Debu:
    We are not seeing that any more than one MDB processes messages from the AQ even though we have 5 MDB's in the pool. What might be causing this?

  • Problems with an MDB and OJMS

    I have a problem with MDBs and OJMS/AQ. onMessage() method fires well when a message is enqueued, but it is never dequeued. Messages are well received by MDB, but they remain on AQ table without dequeue. Can anybody help me? Thanks

    This is bug: Contaner managed transactions do not work with MDBs in OC4J 9.0.3. Either switch to BMT, or use the 10.0.3 preview on OTN.
    The bug is fixed in the 9.0.4 production version which is expected "real soon now".
    HTH
    -Doug

  • Can the AQ Adapter send a JMS Message?

    I'm trying to use the AQ adapter to enqueue an XML message into a queue who's payload type is AQ$JMS_TEXT_MESSAGE so that it can be consumed by a Message Driven Bean in OC4J.
    Simply sending the XML reults in:
    "AQ Adapter: ** Error ** Can not enqueue messages to queue PLEDGE. ADT Payload defined for Queue PLEDGE does not match with OAI Message. Please check attribute "Pledge". In order for the AQ Adapter to enqueue OAI messages to the queue, the queue payload must match the ADT imported through iStudio."
    I tried importing the AQ%JMS_TEXT_MESSAGE but can't see any easy way to construct it.
    Is this even possible?
    -Doug

    Doug,
    the AQ$JMS_TEXT_MESSAGE is an object type. So you'll need to import that type as your application view.
    The problem with this JMS objecttype is how to populate it.
    When your text (XML) is more than 4000 characters in length, the TEXT_LOB attribute should get the text. If less, the TEXT_VC attribute should get the text. In any case, the TEXT_LEN should be set to the length of the XML.
    AFAIK, you can't currently do this with InterConnect directly.
    The most popular solution is to have InterConnect deliver this message to a simple non-JMS queue and have some PL/SQL or java code convert it to a proper JMS text message and put it in the JMS text queue.
    There are some features in the DBMS_AQ package to register a plsql procedure to be triggered when a message arrives (dbms_aq.register). That could be a procedure which converts the message for you.
    In ProcessConnect (coming soon) there is a dedicated JMS adapter available.
    HTH, Marc

  • XMLType and Oracle JMS compatibility

    We need to receive messages from a Oracle-AQ queue with paylod_type XMLType,
    and we would like manage this with JMS and MDB using OC4J 10.1.3.
    Somebody know if is it possible to map such a queue as a JMS source or are there
    limitations to the specific SYS.AQ$_JMS_MESSAGE paylod_type?
    In the second case, what kind of workaround can we put in place? The XMLType is
    a must in our environment, so we have to manage it in some way...
    Thanks,
    Giorgio.

    We need to receive messages from a Oracle-AQ queue with paylod_type XMLType,
    and we would like manage this with JMS and MDB using OC4J 10.1.3.
    Somebody know if is it possible to map such a queue as a JMS source or are there
    limitations to the specific SYS.AQ$_JMS_MESSAGE paylod_type?
    In the second case, what kind of workaround can we put in place? The XMLType is
    a must in our environment, so we have to manage it in some way...
    Thanks,
    Giorgio.

  • Send message from client problem

    Hi all,
    i want send some JMS messages from standalone client program to MDB through OC4J JMS service. I wrote little sample client program:
         public static void main(String [] args)
              throws Exception
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
              env.put(Context.SECURITY_PRINCIPAL, "admin");
              env.put(Context.SECURITY_CREDENTIALS, "admin");
              env.put(Context.PROVIDER_URL, "ormi://localhost:23791/");
              Context context = new InitialContext(env);
              QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("jms/my/test.queueConnectionFactory");
              QueueConnection connection = connectionFactory.createQueueConnection();
              QueueSession qSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              Queue q = (Queue)context.lookup("jms/my/test.queue");
              QueueSender sender = qSession.createSender(q);
              connection.start();
              TextMessage message = qSession.createTextMessage();
              message.setText("Text messaga no.: "+i);
              sender.send(message);
              sender.close();
              qSession.close();
              connection.close();
    But it throws JMSException:
    javax.jms.JMSException: Unable to connect to JMSServer (/127.0.0.1:9127)
         at com.evermind.server.jms.EvermindQueueConnection.connect(EvermindQueueConnection.java:144)
         at com.evermind.server.jms.EvermindQueueConnection.send(EvermindQueueConnection.java:94)
         at com.evermind.server.jms.EvermindQueueSession.send(EvermindQueueSession.java:117)
         at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.java:75)
         at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.java:36)
         at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.java:31)
         at SenderClient.main(SenderClient.java:35)
    Row 35 is sender.send(message);
    And running standalone OC4J (9.0.3) throws exception too:
    java.lang.NullPointerException
         at com.evermind.server.jms.JMSServer.removeClient(JMSServer.java:724)
         at com.evermind.server.jms.JMSRequestHandler.run(JMSRequestHandler.java:278)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:66)
    All jms.xml stuff is configured properly.
    Can someone help me what i do wrong?
    Best regards
    Radovan Sninsky

    Hi radovan,
    Check your jdk versions at your server and client. Make sure that your are running your server and client with the same jre. Even i had the same problem when oc4j was started with jdk1.4 jre and running the client using jdk1.3.
    Hope this helps
    shrini

  • Message Driven Bean (MDB) for AQ Queue cannot start

    I am working on the creating a message driven bean in Managed OC4J 10.1.3.0 to consume messages from AQ Queue. I am using a Oracle AS generic JMS connector and a resource adapter to create a message listener for the MDB.
    I am able to make successful connections to the AQ and also consume messages, but if i try to start the MDB using the Oracle Application Server Web Admin console, the MDB fails to start, i have to restart the entire OC4J instance to restart the MDB.
    The error on the Admin Console says "Failed to start MDB. Please see log for details." , but the problem is nothing is written to the log file.
    I have tried setting the logging level in web admin console to FINER but still no new errors are written to the log file. I have checked the opmn logs, instance logs as well the home logs.
    Please help, since this issue will further help us decide whether we need to go with the implementation or not.

    As far as I know XMLType JMS messages are not supported when using OJMS. They might be for OC4J 10.1.3, but I thought it's an AQ limitation rather than an OC4J one.. To be sure you might just log a TAR on Metalink.
    hth,
    Bastiaan

  • Error running A Simple MDB example with oc4j

    Hi All,
    I am new to OC4J, I am trying the example for MDB from OTN's site, A Simple MDB example with OC4J. When I start my OC4J on the command line > java -jar oc4j.jar
    I get the following exception:
    Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar homes: No lo
    cation set for Topic resource MessageDrivenBean MDB
    Error in application mdb: Error loading package at file:/C:/unzipped/mdb_hello_w
    orld/build/mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:40 Error instantiating application 'mdb' at file:/C:/unzipped/mdb
    helloworld/build/mdb.ear: Error initializing ejb-module; Exception Error in ap
    plication mdb: Error loading package at file:/C:/unzipped/mdb_hello_world/build/
    mdb/mdb.jar, Error deploying file:/C:/unzipped/mdb_hello_world/build/mdb/mdb.jar
    homes: No location set for Topic resource MessageDrivenBean MDB
    04/07/09 15:21:41 Error starting HTTP-Server: Address already in use: JVM_Bind
    04/07/09 15:21:41 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    I have just followed all the steps provided to run the example exactly as given.
    I did add my Topic and TopicConnectionFatory entries in my jms.xml -
    <topic name="The Topic" location="jms/theTopic">
    <description>A MDB topic</description>
    </topic>
    <topic-connection-factory location="jms/theTopicConnectionFactory" />
    Here is the ejb-jar.xml given in the example:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <description>My message driven bean</description>
    <ejb-name>MDB</ejb-name>
    <ejb-class>MDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    <resource-ref>
    <description>The log topic where log events are broadcasted...</description>
    <res-ref-name>jms/theTopic</res-ref-name>
    <res-type>javax.jms.Topic</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
    <description>The Factory used to produce connections to the log topic...</description>
    <res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MDB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is my orion-ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-time="e7f5a3f42d">
    <enterprise-beans>
    <message-driven-deployment name="MDB" destination-location="jms/theTopic" connection-factory-location="jms/theTopicConnectionFactory">
    <resource-ref-mapping name="jms/theTopic" />
    <resource-ref-mapping name="jms/theTopicConnectionFactory" />
    </message-driven-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    I don't know what is wrong. Please help me.
    Rohini

    Hello,
    I guess that you didn't define the Topic and/or TopicConnectionFactory on your OC4J
    Inside $J2EE_HOME/config (see: subfolders .../j2ee/home/config e.g.)folder are several xml files appropriate for OC4J configuration. There's also jms.xml. Please, verify this one, it should have some entries for your settings.
    Just like in an example below:
    <topic-connection-factory name="TopicConnectionFactory" location="jms/TopicConnectionFactory"/>
    <topic name="theTopic" location="jms/theTopic"/>
    The names should be the same like in your MDB deployment descriptors. It works of course after next OC4J server restart.
    I hope helped you
    Krzysztof

  • MDB from AQ in OC4J R2 developers preview.

    Does any one have an example of the configuration reqired to instantiate MDBs from an Oracle AQ.
    I can see no Oracle docs on this although it is listed as one of the features in OC4J R2.
    Cheers,
    Matt

    good afternoon all -
    The Oracle AQ integration for OC4J should function with the developer's release available on OTN. I do recall seeing a few issues that needed to be worked around, I will dig the email I have up and send that in a separate post.
    What follows is a text cut-n-paste of a few sections from the J2EE Services Guide documentation we are providing for Release 2. These books are not yet published on OTN - I'll try and find out when we will be making them available, they contain a lot of good information.
    Please take a read of this see if it helps you to configure Oracle AQ/OJMS as a JMS resource provider for OC4J.
    cheers!
    -steve-
    Resource Providers
    The ResourceProvider interface allows you to plug in third-party message providers (such as Oracle Advanced Queuing, MQSeries and SonicMQ) as JMS resource providers. This allows EJBs, servlets, and OC4J clients to access many different queue implementations. The third-party message providers are accessed through the ResourceProvider interface.
    Note:
    Except as noted here, you configure OC4J JMS as you would any other JMS implementation.
    Plugging In Resource Providers
    To add a custom resource provider to OC4J, you must add the <resource-provider> tag to orion-application.xml. This section describes how to add one such ResourceProvider.
    An example ResourceProvider, ContextScanningResourceProvider, is bundled with OC4J. To use this ResourceProvider, you would add the following tag to orion-application.xml:
    <resource-provider
    class="com.evermind.server.deloyment.ContextScanningResourceProvider"
    display-name="SwiftMQ">
    <description>
    SwiftMQ resource provider.
    </description>
    <property name="java.naming.factory.initial"
    value="com.swiftmq.jndi.InitialContextFactoryImpl">
    <property name="java.naming.provider.url"
    value="smqp://localhost:4001">
    </resource-provider>
    This example makes SwiftMQ the default ResourceProvider for JMS connections -- the first <resource-provider> tag in orion-application.xml becomes the default resource provider for the types it handles. Adding this tag makes the resource available in the Orion JNDI under java:comp/resource/, as well as making SwiftMQ the default JMS resource for such actions as deploying a message-driven bean.
    Configuring Message Providers
    Install and configure the message provider according to the instructions in its documentation, then verify the installation by running any examples or tools supplied by the vendor.
    Register the message provider in some JNDI-accessible store (a file system, an LDAP OiD, or the like.) Use JMS provider tools to configure and populate this JNDI store with, for instance, the provider's QueueConnectionFactory and the queues of interest.
    Make the JNDI store accessible to OC4J by adding a <resource-provider> entity to orion-application.xml pointing to the JNDI store. This example demonstrates using SonicMQ as the message provider and the file system as the JNDI store:
    <resource-provider
    class="com.evermind.server.deployment.ContextScanningResourceProvider"
    name="SonicJMS">
    <property name="java.naming.factory.initial"
    value="com.sun.jndi.fscontext.RefFSContextFactory" />
    <property name="java.naming.provider.url"
    value="file:/private/jndi-directory" />
    </resource-provider>
    Copy the required JNDI files (for a file-system JNDI, fscontext.jar and providerutils.jar) to $J2EE_HOME/lib.
    Restart OC4J. Whenever you add, delete, or reconfigure a resource provider, you must restart OC4J.
    JNDI Resource Provider Names
    OC4J resource provider extensions create resources under the java:comp/resource JNDI name tree. OJMS resource names take the form:
    java:comp/resource/ProviderName/ResourceType/ResourceName
    where:
    ProviderName
    is the user-chosen name of the resource provider.
    ResourceType
    (required for Oracle AQ/OJMS resource providers only) is a fixed string that can take one of four values: QueueConnectionFactories, TopicConnectionFactories, Queues, or Topics. The specified value identifies the JMS resource as being of the appropriate administered object type.
    ResourceName
    is a user-chosen name for a JMS connection factory or a valid AQ queue name for a JMS destination. Valid Oracle AQ names conform to the [schema.]queue_name scheme.
    Accessing Message Queues
    OC4J applications can now access the message queues. Message queues can be accessed in one of two ways:
    Through their names, as in
    java:comp/resource/<Provider_Name>/<Queue_Name>
    An application would access the queue like this:
    queueConnectionFactory=(QueueConnectionFactory)
    jndiContext.lookup("java:comp/resource/SonicJMS/QueueConnectionFactory");
    By binding message-driven beans to queues in orion-ejb-jar.xml
    To bind message-driven beans to queues in orion-ejb-jar, you would add a tag like:
    <message-driven-deployment
    connection-factory-location="java:comp/resource/SonicJMS/QueueConnectionFactory"
    destination-location="java:comp/resource/SonicJMS/SampleQ1"
    name="MessageBean">
    Using Oracle AQ as a Resource Provider
    To access Oracle AQ queues through JMS, you must do the following:
    Create an RDBMS user through which the JMS application will connect to the back-end database. The user should have the necessary privileges to perform AQ operations. AQ allows any database user to access queues in any schema, provided the user has and the schema exports the appropriate access privileges.
    Configure an OC4J resource provider with information about the back-end database. Create data sources or LDAP directory entries, if needed.
    Access the resource using Oracle AQ/OJMS resource names, which include the ResourceName name component.
    Configuration
    The OC4J resource provider for OJMS is implemented by the class oracle.jms.OjmsContext. Each OJMS resource provider instance is a <resource-provider ...> XML element (a child element of the orion-application element) in the $J2EE_HOME/config/application.xml file.
    There are 3 ways of configuring the OJMS resource provider.
    Inline configuration (all relevant information for accessing the back-end database is specified within the resource-provider element in application.xml).
    Data Source configuration (the resource-provider element in application.xml refers to a data-source element configured in data-sources.xml which contains information on accessing the back-end database).
    LDAP configuration (the resource provider contains information to access an OID/LDAP directory which contains information on accessing the back-end database).
    This section describes only the inline and data source configuration methods.
    Inline Configuration
    An inline resource provider configuration consists of a resource provider instance name (user-chosen, but unique among all resource providers configured in OC4J), a JDBC URL to connect to the back-end database, and the user/password to connect as. For example:
    <resource-provider class="oracle.jms.OjmsContext" name="MyContext1">
    <description>OJMS Context using thin JDBC</description>
    <property name="url"
    value="jdbc:oracle:thin:@myhost.foo.com:1521:mydb"></property>
    <property name="username" value="myuser"></property>
    <property name="password" value="mypass"></property>
    </resource-provider>
    <resource-provider class="oracle.jms.OjmsContext" name="MyContext2">
    <description>OJMS Context using OCI JDBC</description>
    <property name="url" value="jdbc:oracle:oci:@mydb.foo.com"></property>
    <property name="username" value="myuser"></property>
    <property name="password" value="mypass"></property>
    </resource-provider>
    This creates 2 resource providers, MyContext1 and MyContext2, that log in as myuser/mypass to the back-end database mydb using the thin and OCI JDBC drivers respectively.
    Data Source Configuration
    A data source resource provider configuration consists of a resource provider instance name (user-chosen, but unique among all resource providers configured in OC4J), a data source name, and the data source configuration (in data-sources.xml). For example:
    <resource-provider class="oracle.jms.OjmsContext" name="MyContext3">
    <description>OJMS Context using a datasource</description>
    <property name="datasource" value="jdbc/MyDS3"></property>
    </resource-provider>
    <resource-provider class="oracle.jms.OjmsContext" name="MyContext4">
    <description>OJMS Context using a datasource</description>
    <property name="datasource" value="jdbc/MyDS4"></property>
    </resource-provider>
    in application.xml and the following data sources in data-sources.xml:
    <data-source
    class="oracle.jdbc.pool.OracleDataSource"
    name="MyDS3"
    location="jdbc/MyDS3"
    xa-location="jdbc/xa/MyXADS3"
    ejb-location="jdbc/MyEjbDS3"
    url="jdbc:oracle:thin:@myhost.foo.com:1521:mydb"
    username="myuser"
    password="myuser"
    inactivity-timeout="30"
    />
    <data-source
    class="oracle.jdbc.pool.OracleDataSource"
    name="MyDS4"
    location="jdbc/MyDS4"
    xa-location="jdbc/xa/MyXADS4"
    ejb-location="jdbc/MyEjbDS4"
    url="jdbc:oracle:oci:@mydb.foo.com"
    username="myuser"
    password="myuser"
    inactivity-timeout="30"
    />
    This creates 2 resource providers, MyContext3 and MyContext4, that use the data sources jdbc/MyDS3 and jdbc/MyDS4 respectively to connect to the back-end database. The data sources themselves contain the appropriate JDBC driver/connect information.

  • OC4J 9.0.3 (date 07/31) problem with the MDB-demo and Oracle9i-databases (v9.*)

    Trying to get the supplied mdb-demo to work in the J2EE 1.3 certified version of OC4J 9.0.3 (from 07/31).
    It works fine with the OJMS-provider in a Oracle 8i v8.1.7 database but not in a Oracle9i database.
    I have now tried three possible versions of Oracle9i available from OTN and Metalink:
    - v9.0.1.1
    - v9.0.1.3.1
    - v9.2.0.1
    I have noted from the "known-issue-page" that the supported version is v9.0.1.3 with patch #2416054 applied. Unfortunately is that patch only available for Solaris as of today...
    I all cases I get one and the same error message from the CartEJB - bean in OC4J:
    CartEJB::send2Queue: begin; item=QueueqSNDQUE|Queue
    CartEJB::send2Queue; Exception occurred: oracle.jms.AQjmsException: ORA-06550: l
    ine 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'AQ$_JMS_ENQUEUE_BYTES_MESSAGE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    CartEJB::send2Queue: end
    Is there some post-installation-step that I missed (e.g. copying som jar-fil from Oracle9i to OC4J...) or is there anything else I can do to get the supplied MDB demo working with Oracle9i?
    Thanks in advance,
    Magnus Larsson.

    Ok...
    Thanks for your help!
    So I will stick with Oracle8i v8.1.7 until the patch is available on Windows...
    Maybe I'll make a try with Linux also (thanks for noting me!), but probably will the Windows patch be available before I succeed with Oracle9i on Linux...
    I will post a reply once I get the patch working on either Linux or Windows!
    Regards,
    Magnus.

Maybe you are looking for