Version 5

    Instructions for using the GlassFish JCA integration with OracleAQ.

     

    1. Run the sql script on oracle, make sure that you have given rights to your user to access the package DBMS_AQADM.

     

    BEGIN

     

    DBMS_AQADM.CREATE_QUEUE_TABLE(

     

    queue_table => 'FromTable',

     

    queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',

     

    sort_list => 'PRIORITY,ENQ_TIME',

     

    multiple_consumers => false,

     

    compatible => '9.2');

     

    DBMS_AQADM.CREATE_QUEUE(

     

    queue_name => 'FROM_QUEUE',

     

    queue_table => 'FromTable');

     

    DBMS_AQADM.START_QUEUE(

     

    queue_name => 'FROM_QUEUE');

     

    DBMS_AQADM.CREATE_QUEUE_TABLE(

     

    Queue_table => 'ToTable',

     

    Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',

     

    sort_list => 'PRIORITY,ENQ_TIME',

     

    multiple_consumers => false,

     

    compatible => '9.2');

     

    DBMS_AQADM.CREATE_QUEUE(

     

    Queue_name => 'TO_QUEUE',

     

    Queue_table => 'ToTable');

     

    DBMS_AQADM.START_QUEUE(

     

    queue_name => 'TO_QUEUE');

     

    DBMS_AQADM.CREATE_QUEUE_TABLE(

     

    Queue_table => 'LOGQTABLE',

     

    Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',

     

    sort_list => 'PRIORITY,ENQ_TIME',

     

    multiple_consumers => false,

     

    compatible => '9.2');

     

    DBMS_AQADM.CREATE_QUEUE(

     

    Queue_name => 'logQ',

     

    Queue_table => 'LOGQTABLE',

     

    max_retries => '2');

     

    DBMS_AQADM.START_QUEUE(

     

    queue_name => 'logQ');

     

    END;

     

    2. Go into the enterprise management console and grant rights to queue and dequeue for the queues to the user.

     

    3. Download the OracleAQAdapter and the oracleaq-ds.xml file from this case and put it in your deploy directory.

     

    4. Find and copy these jar files from your Oracle directory into your adapter. I can't give you a full adapter that has oracle jars in it due to licensing concerns.

     

    aqapi.jar

     

    bcel.jar

     

    connector.jar

     

    javax77.jar

     

    jmxri.jar

     

    oc4jclient.jar

     

    ojdbc14.jar

     

    5. Look at the configuration and change the arguments to in the ds to match your own settings.

     

    Notes about doing it. Some of these could just be my version that I'm working on.

     

    1. Oracle doesn't seem to support a generic connection factory on my version. So I have to request a queueconnection factory. Look at the example that I used to test it.

     

    2. Oracle doesn't seem to support a producer, they support senders and receivers. ( please see the examples)