Java advanced queue MDB class usage

Hello,
Loads of questions about JMS AQ and MDB.
I have not found anything that tells you how to use the oracle.jms classes within a MDB's directly. Do I just cast the message to a AQMessage and retrieve from there?
I have found plenty of documentation about using the oracle.jms classes. Ive found a lot of information about using advanced queues and enqueing and dequeuing to them in Java. I have found information about MDBs and how to use them as a regular service ie: using TextMessage
Is there a simple document describing MDB oracle AQ classes? I have looked through umpteen million Oracle documents to no avail.
Is there an interface for MDB in the Oracle AQ classes which has an onMessage() method which I can implement taking in oracle.jms classes?
When processing a message that I would like to put on another queue do I call the AQ classes to enqueue a message and set its attributes that way or do I use the JMS classes and their methods to do that?

http://download-west.oracle.com/docs/cd/A97688_12/generic.903/a97677/mdb.htm#1013265 should get me most of the way there.

Similar Messages

  • Help me in usage of advanced queuing please ....

    hello all,
    we are developing a network based application in java servlets and oracle 8i as database at the servers.
    to transfer data as costomised messages we are using ibm mq series as middle layer on top of tcp/ip.
    we want to replace ibm mq series with oracle advanced queuing.
    i could not find any details regarding this latest feature
    i want to know what are the java packages available to use this feature and how to use them
    are they similar to that of ibm.mq package
    can i have some sample code about the usage of them ?
    please send me the details ......
    with regards,
    prasad

    Try the standard ORACLE documentation
    Oracle8i Application Developers Guide - Advanced Queuing (AQ).
    There are also some examples.
    Others you can find in $(ORACLE_HOME)\oci\samples

  • Advanced Queuing for Oracle / Dequeue failed

    Hi *,
    I'm using Oracle Advanced Queuing and OC4J with some MDBs. Unfortunately sometimes I have following exception:
    03-05-21 10:29 Error listening to 'USER_QUEUE'
    oracle.jms.AQjmsException: JMS-120: Dequeue failed
         at oracle.jms.AQjmsError.throwEx(AQjmsError.java:283)
         at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2034)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:981)
         at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:918)
         at oracle.jms.AQjmsConsumer.receive(AQjmsConsumer.java:834)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:905)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
         at java.lang.Thread.run(Thread.java:479)
    All messages hang in my queue with READY state. I really don't know what is happening.
    I have observed that when I run my MDB, but on the different machine, one message is consumed and the same exception arises.
    Why Oracle cannot run dequeue process correctly?
    best regards
    Maciek

    We had similar problems. Mostly the cause was incorrect message type (other than AQ$_JMS..., i. e. ancestor of "message" class) or incorrectly filled body of a message. For example, there seems to be a bug in AQ$_JMS_TEXT_MESSAGE object: you have to set at least one of varchar2 or CLOB in body of message. Otherwise, dequeue will fail, JMS assumes there is some text inside.
    We are using 8i and 9i databases and messages are created using plain constructors (not methods from 9i, since code has to run on either version). I cannot recall any troubles using methods from 9i during researching, but there might be a bug somewhere.
    Myrra

  • Windows Vista "java.lang.ClassNotFoundException: loader.class" error.

    Hello,
    Whenever I try to visit websites that have a java applet I get a dialogue with the following error:
    java.lang.ClassNotFoundException: loader.class.
    I have tried uninstalling/reinstalling java, and also adding the -xmx and -xms parameters for java applet runtime setting in control panel with various values from 128m to 1g.
    The applet at http://www.java.com/en/download/installed.jsp?detect=jre&try=1 does work and reports "CONGRATULATIONS, you have the Latest version of Java!", "Java Runtime Version 1.6.0."
    I have been experiencing this problem ever since I installed Windows Vista Home Premium a day or two ago. Any help is appreciated.
    Regards
    Greg
    =====================================
    Full output from Java Console
    =====================================
    Java Plug-in 1.6.0
    Using JRE version 1.6.0 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Greg Taylor
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class loader.class not found.
    java.lang.ClassNotFoundException: loader.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    java.lang.ClassNotFoundException: loader.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more

    ive been having the same problems, if youve resolved this problem, please tell me.
    all help is appreciated

  • Error when connect to Advanced Queuing Oracle

    Dear sir,
    I'm using intellij IDE write one a class java to connect Advanced Queuing, my code follow :
    queueConnectionFactory = AQjmsFactory.getQueueConnectionFactory("host", "sid", 1521, "thin");
    queueConnection = queueConnectionFactory.createQueueConnection("usernamer", "password");
    but program have error : "Exception in thread "main" oracle.jms.AQjmsException: ORA-00604: error occurred at recursive SQL level 1
    ORA-01882: timezone region not found".
    I try connect this schema by "sql developer", i receive same error. i change file sqldeveloper.conf, put line - AddVMOption -Duser.timezone="+07:00" then sql developer work fine.
    I download tzupdater-1.3.40-2011h and run "java -jar tzupdater.jar -u" and "java -jar tzupdater.jar -f" but app not run.
    can you have me. i need complete this app.

    Post the stack trace

  • JMS Interface to Advanced Queuing

    I want to use the Advanced Queuing features from Java. The rub: I am doing a queue-to-queue message transfer between JMS servers (Swift & Oracle).
    What would help me get the the next step is this: I am looking at the SampleUtilities.java file included with the Java Message Service sample programs available at http://java.sun.com/products/jms/docs.html
    In this class, there is a method called getQueueConnectionFactory() that returns a QueueConnectionFactory object. I need to add provider-specific code in this method.
    Any ideas what the provider-specific code should be? If there is anybody who as made the standard set of sample programs work, perhaps you could post your changes to SampleUtilities.java?
    Thanks in advance.
    -best-darr-

    It's important to note the difference between "Oracle9i" and "Oracle9iAS". Much of the AQ documentation is in the Oracle9i documentation set, not the Oracle9iAS set. That is, it's documented in the database documentation, not the application server documentation.
    There is certainly some in the AS documentation, but I had to see the database documentation to get some details.

  • I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Is Apple aware of this problem? No longer supported?

    My web page uses a Java Applet to allow my visitors to replay chess games; the Chess Viewer Deluxe applet was written by Nikolai Pilafov some time ago and has been working properly for some time (until recently). I don't monitor this part of my site regularly so I am not sure when it began to fail. On his web site [http://chesstuff.blogspot.com/2008/11/chess-viewer-deluxe.html] he has a link to check LiveConnect object functionality (which fails for OBJECT tags). His recommendation is to "seek platform specific support which might be available from the JRE developers for your platform".
    I have been getting java.lang.ClassNotFoundException: ZeroApplet.class and java.lang.ClassNotFoundException: JavaToJS.class crashes with JRE version 1.6.0_26-b03-384-10M3425 VM executing a Java Applet. Until I checked the LiveConnect object functionality, I was unable to identify the source of the console error messages. This does seem to be the smoking gun.
    Is Apple aware of this problem? Are these classes no longer supported? Has anyone else had this problem? You can attempt to recreate the problem locally by going to my web page: http://donsmallidge.com/DonSmallidgeChess.html
    Thanks in advance for any help you can provide!
    Abbreviated Java Console output:
    Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03-384-10M3425 Java HotSpot(TM) 64-Bit Server VM
    load: class ZeroApplet.class not found.
    java.lang.ClassNotFoundException: ZeroApplet.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)
    load: class JavaToJS.class not found.
    java.lang.ClassNotFoundException: JavaToJS.class
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
        at sun.applet.AppletPanel.createApplet(AppletPanel.java:807)
        at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2389)
        at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
        at sun.applet.AppletPanel.run(AppletPanel.java:368)
        at java.lang.Thread.run(Thread.java:680)

    I just went up to check the LiveConnect object functionality page AND IT WORKED THIS TIME! I must confess, this is very mysterious. I will do some more checking and reply here if I can determine why it is working now (and more importantly, why it didn't work before).

  • Java Message Queue/ JMS Vendor performance.

    Hi,
    I need some help from you folks. In our system we are dealing with large number (tens of thousands) of operations per second. I'm doing some research in order to determine if we can use JavaTM Message Service (JMS) API in this system. I red that Java Message Queue was voted "Best Java Messaging Tool" by Java Developer's Journal readers and JMQ now marked by iPlanet[tm] E-Commerce Solutions. So I'm looking for numbers. How many clients/operations iPlanet or other JMS vendors can support per second. Unfortunately I didn't find any concrete example of built systems, number of maximum operation supported per second.
    Please response to [email protected] also.
    Thanks in advance,
    Daniel Drazner

    Following configuration: pIII 1GHz, standard vm settings, JBoss 2.4.4, jdk1.3.3 sun
    My project (probably good optimized) has following performance:
    - asynchronous sending message to queue:20 ms
    - synchronous (send/replay) 200 ms
    This are statistics for single thread, but this is some how scalable, so for 20 parallel threads you will have the same performance.
    Topics are much faster, but I need PTP messaging

  • Java Print Queue Manager

    I am new to Java. I recently ran into a need to have a Java print queue manager to handle network printers. Is something like this already available or are there companies who can provide this?
    Please email me with any comments ([email protected]).
    Thank you in advance for any help.
    Regards,
    JS

    Have a look at javax.print API. I'll warn you, it's limited, but it can dynamically discover networked printers.

  • Exception in thread "main" java.lang.NoClassDefFoundError: Emp/class

    Dear all,
    It occur 'Exception in thread "main" java.lang.NoClassDefFoundError: Emp/class' error when I test a oracle java sample.I've already SET CLASSPATH=C:\ORACLE\JDBC\LIB\CLASSE~1.ZIP.
    following is the source code:
    import java.sql.*;
    class Emp
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Connect to the database
    // You must put a database name after the @ sign in the connection URL.
    // You can use either the fully specified SQL*net syntax or a short cut
    // syntax as <host>:<port>:<sid>. The example uses the short cut syntax.
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@localhost:1521:orcl",
                        "scott", "tiger");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select the ENAME column from the EMP table
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
    // Iterate through the result and print the employee names
    while (rset.next ())
    System.out.println (rset.getString (1));
    Can you tell me what should also be set in classpath?
    thanks in advance.

    You are right, the program is absolutely correct and I've run it before.but why set PATH=%PATH%;C:\ORACLE\JDBC\LIB\CLASSE~1.ZIP?I don't think it is correct.
    I've ever run this jdbc program before and remeber only set classpath(path is also be set only for run executable program, for example set path=%path%;c:\j2sdk\bin),
    I think the only difference with before is:
    1,oracle version is changed from enterprise version to personal version
    2,OS is changed from NT to windows 98
    but i dont know if it lead to problem and can you give me some advice?

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • Oracle JMS Advanced Queuing

    Problems with Oracle JMS Advanced Queuing
    Hello,
    We have build an application using Advanced Queuing (database version 10.2.0.1.0). Everything works fine using PL/SQL. But when we try to send in messages through the Oracle JMS interface messages with less then 4000 bytes are stored in the queu table but the content of the message is not stored in one of the user data attributes.
    Messages larger then 4000 bytes result in the following error:
    oracle.jms.AQjmsException: JMS-204: Er is een fout opgetreden in de AQ JNI-laag.
    at oracle.jms.AQjmsError.throwEx(AQjmsError.java:311)
    at oracle.jms.AQjmsProducer.enqueue(AQjmsProducer.java:1323)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:692)
    at oracle.jms.AQjmsProducer.send(AQjmsProducer.java:465)
    at nl.detailresult.aqadapter.test.OracleQueueSendTextMsgTest.testOracleQueuePlus4000(OracleQueueSendTextMsgTest.java:125)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    [Linked-exception]
    oracle.jms.AQjmsException: ORA-00942: table or view does not exist
    As far as I can see we have done everything according to the books but does anyone have a clue what we might have missed?

    Hi,
    Have you found a solution to this? I am running into similar issue with SOA Suite using OJMS queues.
    Regards,
    Rajesh

  • Exception in thread "main" java.lang.NoClassDefFoundError: SayHi/class

    Program - c:\jdk1.3.1_01\demo\SayHi.java
    import java.io.*;
    class SayHi
    public static void main(String[] args)
    System.out.println("hellow Worls");
    Operating Environment-
    1) New installation of Windows Advance 2000 Server. No other installatons.
    2) Installed j2sdk-1_3_1_01a-win.exe which I downloaded today.
    3) Modified path - PATH=c:\jdk1.3.1_01\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
    4 Created the above program in c:\jdk1.3.1\demo
    4a) javac SayHi.java
    4b) java SayHi.class
    ERROR MESSAGE ENCOUNTERED
    Exception in thread "main" java.lang.NoClassDefFoundError: SayHi/class
    5) I've experimented with the -classpath
    6) I've followed the installation notes for Version 1.3.1
    and searched the support site and found numerious problems in this area.
    7) I've encountered this same problem on Windows 2K Professional.
    I need some help getting the tools to work

    Try running the sample by typing:
    java SayHi
    I hope you're using a book or taking a course to learn Java. Pay attention to the details.

  • Sample Message Driven Bean using Oracle Advance Queuing

    Hi,
    Can someone please provide me with sample MDB using Oracle Advance Queuing to Enqueue & Dequeue messages?
    Thanks

    Write your email Id .....I have got a test case which basically enqueus and dequeues the messages using Oracle9i AQ..
    --Venky                                                                                                                                                                                                                                                                   

  • Oracle Advance Queue

    I am using Jdev / oc4j as my server. I have a message driven bean created which is supposed to listen to an advance queue created in an oracle db. I am having a lot of trouble deploying the application. Is there an easier way out of editing the xml files and writing deployment descriptor? Please help.
    Regards,
    Yazad Khambata.

    Hi,
    Just wondering if you were able to figure this out. I am too looking the samething. Basically MDB to listen on AQ, Can someone provide a simple example.
    Thanks

Maybe you are looking for