AQ+JMS+no LDAP+OC4J

I'm trying to create a JMS client without having an LDAP service running. I've read just about everything and I haven't found an example of this anywhere. There appear to be hints about the ability to do this, however these hints are a little too vague to decypher, so an example.
anyone?

I'm have the same issue. I'm currently trying to seen if the Oracle 9.2.0.5.0 patch corrects the issue (waiting for the file down load). There is a known issue in Oracle and cleaning up Inactive connections. I assuming the two are related ... I hope it works.

Similar Messages

  • How to consume JMS message in oc4j from web logic server 11.1.1.3

    Hi all,
    I would like to know how to consume the JMS messages in oc4j instance from 11.1.1.3 (web logic). Can anyone guide me any documentation? Thanks.
    Soe

    Hi,
    Have a luk at the below link
    http://blogs.oracle.com/TechMusings/2008/08/connecting_to_weblogic_jms_pro.html
    you also have other options like creating foreigh JNDI or JMS bridge.

  • How to configure JMS queue on OC4J server. Development in JDeveloper 10G

    Hi there,
    I have to configure a JMS for an Asynchronous process in my Application which will be running in Oracle 10G Application Server. Development Environment is Oracle JDeveloper 10G.
    I am facing a problem on how to configure JMS queue.
    Steps Followed are:
    in the <JDevloperHome>/j2ee/home/config
    1. Made the new queue and connection factory's JMS entry in jms.xml.
    2. Specifed the queue in oc4j-connectors.xml.
    3. played around with application.xml
    and tried all combinations, but the message producer always failed to lookup the queue.
    Need help on the steps to follow so that the producer can post the message in the queue.
    Also please help how to configure the MDB to listen to the queue.
    Thanx and Regards
    Subham

    If you were dealing with Oracle 10g app server as opposed to standalone, I might be better able to help you.
    One thing though, when you are configuring your MDB in the orion-ejb-jar.xml file, do not forget to specify attribute listener-threads, otherwise no matter how many beans you have in your MDB pool, only one bean will be listening to the queue. Many listener-threads equal to max number of beans in pool.

  • JMS Exception for oc4j 9.0.3 with 9.0.1.1.1 database (Urgent)

    When I enqueue message into the AQ, I got the following error message
    oracle.jms.AQjmsException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'AQ$_JMS_ENQUEUE_TEXT_MESSAGE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jms.AQjmsProducer.enqueue(AQjmsProducer.java:1161)
    at oracle.jms.AQjmsProducer.publish(AQjmsProducer.java:1371)
    at oracle.jms.AQjmsProducer.publish(AQjmsProducer.java:1221)
    Please help, this is very urgent! Should I apply any patch to my database? Or something is wrong with the oc4j 9.0.3 container. From 9.0.2 container, I am able to publish a message into the queue from a standalone JMS client.
    Thanks

    When I enqueue message into the AQ, I got the following error message
    oracle.jms.AQjmsException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'AQ$_JMS_ENQUEUE_TEXT_MESSAGE'Chunming -- just replace the ../j2ee/home/lib/aqapi.jar with your $oracle_home/rdbms/jlib/aqapi13.jar ... remember to rename it :). This worked for me.
    have you been able to get an MDB to dequeue from aq? I can enqueue fine (msgs show up in the queue_table) .
    good luck!
    z

  • Simple JMS Configuration on OC4J Developers Preview

    What is the minumum required to configure the default OC4J JMS.
    I have a client deployed with the server that tries to get a Topic Connection Factory ....
    InitialContext ctx = new InitialContext();
    tConFactory = (TopicConnectionFactory)ctx.lookup("java:comp/env/jms/TopicConnectionFactory");
    tCon = tConFactory.createTopicConnection();
    tSession = tCon.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
    but the lookup fails with:
    javax.naming.NameNotFoundException: jms/TopicConnectionFactory not found in DriveStartup
    In jms.xml I have the following:
    <jms-server port="9127">
    <topic-connection-factory location="jms/TopicConnectionFactory" port="9127" password="2143768880" username="admin" />
         <!-- path to the log-file where JMS-events/errors are stored -->
         <log>
              <file path="../log/jms.log" />
         </log>
    </jms-server>
    What else do i have to do ?
    Cheers paul

    Hi Paul,
    I had similiar problems like the one you describe.
    I got the JMS example (CoffeeMaker) running, but had problems with my own application ( Object not bound).
    In my case, I got it running now when I only use the absolute necessary (oc4j.jar, junit.jar in my case) in my classpath
    (of course the application client xml's must contain your lookup names, but I did not !!! have to setup
    my queue in jms.xml (wonder why).
    You might try this (oc4j.jar references the required libs for jms,jndi,etc. internally)
    [Comment to "absolute necessary": of course I have a CLASSPATH which contains only the necessary libs.
    But since we are working on a framework which does not only want to connect to OC4J JMS (or EJB), I have
    a CLASSPATH containing other libs. I have to find the correct order, I guess.]
    But still my question to this forum: how is it possible that a queue is started "implicitly" (that means it is
    not configured in jms.xml). Is this desired or mandatory (Sun J2EE reference implementation does the same).
    Or am I missing something ?
    Regards,
    Armin

  • Jms upgrade from oc4j 10.1.2.2 to 10.1.3

    hello,
    I have recently upgraded from oc4j 10.1.2 to 10.1.3 - and everything works ok within my apps apart from JMS messaging.
    I have 2 apps within the same oc4j container, the first produces topic messages
    ObjectMessage message = session.createObjectMessage(obj);
    The second receives the messages - by implementing the MessageListener onMessage interface.
    Everything worked perfectly under oc4j 10.1.2 but although I find no errors under 10.1.3 - the receiver never gets the message.
    Can you help direct me how to debug this? - or provide probable areas of investigation?
    thank you

    Thanks Rocky. It was your thorough discussion that prompted me to look at my TopLink sessions.xml configuration more closely, since my existing config did not utilize the transport class you mentioned. As it turns out, I was utilizing the depricated cache coordination mechanism (<cache-synchronization-manager> instead of <remote-command>). With a new configuration as follows, everything is working well:
    <remote-command>
    <commands>
    <cache-sync>true</cache-sync>
    </commands>
    <transport xsi:type="jms-topic-transport">
    <topic-host-url>ormi://localhost:23791/ems</topic-host-url>
    <topic-connection-factory-name>jms/Topic/ToplinkCacheSyncConnectionFactory</topic-connection-factory-name>
    <topic-name>jms/Topic/ToplinkCacheSync</topic-name>
    <jndi-naming-service>
    <user-name>oc4jadmin</user-name>
    <password>oc4j</password>
    <initial-context-factory-name>com.evermind.server.rmi.RMIInitialContextFactory</initial-context-factory-name>
    </jndi-naming-service>
    </transport>
    </remote-command>
    Thanks for your contribution,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Viewing message from DB persistence JMS queue in oc4j

    Hi,
    I want to the actual message posted to the DB persistent JMS queue residing in oc4j container. In jdeveloper 10.1.3.4, i can see the posted messages in QTab for that queue in msgid column but it does not have actual message.
    Please help in this.

    I have used Both Java JMS Webservice wizard in JDeveloper to Insert a TextMessage in JMS queue and Java Code to do so.
    Code Writing JMS Message to queue is as Follows:
    try{
    Hashtable environment=new Hashtable();
    environment.put(Context.INITIAL_CONTEXT_FACTORY,"oracle.j2ee.rmi.RMIInitialContextFactory");
    environment.put(Context.PROVIDER_URL,"opmn:ormi://url");
    environment.put(Context.SECURITY_PRINCIPAL,"user");
    environment.put(Context.SECURITY_CREDENTIALS,"pass");
    Context context=new InitialContext(environment);
    QueueConnectionFactory queueConnectionFactory=
    (QueueConnectionFactory)context.lookup("jms/ESBQueueConnection1");
    QueueConnection queueConnection=queueConnectionFactory.createQueueConnection();
    queueConnection.start();
    Queue queue=(Queue)context.lookup("jms/ESBQueue1");
    QueueSession queueSession=
    queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    QueueSender queueSender=
    queueSession.createSender(queue);
    TextMessage mess1=queueSession.createTextMessage();
    mess1.setText("HELLO MESSAGE");
    queueSender.send(mess1);
    queueSender.close();
    queueSession.close();
    queueConnection.close();
    catch(JMSException ex) {
    catch(NamingException ex) {
    }

  • JMS Topic/Queue [oc4j]

    Hi,
    Can someone point me to a doc which explains how to develope a sample JMS application using standalone oc4j.
    And also what are the properties that are used to create the InitialContext for the oc4j JMS Directory service.
    i. e
    Properties env = new Properties( );
    env.put(Context.SECURITY_PRINCIPAL, "");
    env.put(Context.SECURITY_CREDENTIALS, "");
    env.put(Context.INITIAL_CONTEXT_FACTORY,"");
    env.put(Context.PROVIDER_URL,"");
    InitialContext jndi = new InitialContext(env);
    It will be of great help if u can share a sample for the above.
    Thx,
    Siddhardha.

    Nestor,
    If you are using the 9.0.3 Developers Preview, you can check out the Petstore 1.3 application that uses Oracle AQ queues and topics. Instructions and a pre-build version are available at http://otn.oracle.com/tech/java/oc4j/htdocs/oracle-petstore-readme.html
    Briefly, you don't use jms.xml, as this is used to configure the light-weight (in-memory) JMS. You add an entry to your orion-application.xml detailing a new resource-provider. You can then look up your queues and topics using a standard JNDI lookup using the resource provider.
    Thanks,
    Rob Cole
    Oracle

  • Open ldap + oc4j

    Does OC4j Jazn authenticate against open ldap??

    Or you could also look at writing your own JAAS login module -- the security guide has details on how to use custom Login Modules.
    http://download-west.oracle.com/docs/cd/B10464_04/web.904/b10325/loginmod.htm#1004903
    -steve-

  • JMS Error when using OJMS/AQ in OC4J 9.0.2 but not in OC4J 9.0.3

    Hi,
    I tried to use OJMS/AQ as the JMS provider in OC4J 9.0.2 and OC4J 9.0.3. Resource providers in both the containers point to the same Oracle database (9.0.1.3.0) using the same user account.
    JMS works fine with OC4J 9.0.3 but not with OC4J 9.0.2.
    During the start-up of 9.0.2 container, it successfully connects with Oracle AQ, finds queues in AQ but finally comes back with an error message saying "JMS Error: invalid arguments in call". It does not provide any more information about the error.
    Does any one have got any clue why this error message occur during startup? Any assistance is appreciated.
    The following is the definition of Resource provider in config/application.xml:
    <resource-provider class="oracle.jms.OjmsContext" name="ispojms">
    <description> OJMS/AQ </description>
    <property name="url" value="jdbc:oracle:thin:@Hduna1.corporatetesth.nsw.edu.au:1527:ISP"></property>
    <property name="username" value="ISPDBA"></property>
    <property name="password" value="******"></property>
    </resource-provider>
    The user ISPDBA is given all privileges for AQ in Oracle DB.
    The Message Driven Bean's definition in deployment descriptors:
    Ejb-jar.xml:
    <ejb-jar>
    <enterprise-beans>
    <message-Long postings are being truncated to ~1 kB at this time.

    Hi Balaji,
    What most likely is happening is that you have mismatched versions of apapi.jar (client side) and the database, thus the reason for the "invalid arguments in call" error you're seeing.
    If you're using 9.0.1.3 of the database it should be patched with patch #2416054. Go to Metalink and do a search for this patch to find it. You can then use the apapi.jar that comes with the patched version of the DB or the apapi.jar that comes with v9.0.3.
    By the way, v9.0.3 and 9.0.1.3 + patch is a J2EE 1.3 compatible JMS server.
    I'm guessing that you used the apapi.jar that came with v9.0.2 with the v9.0.1.3 database and that you've probably already applied the above patch. If you have then just take the apapi.jar that came with v9.0.3 and use it in your v9.0.2 environment.
    In short:
    v9.0.3 apapi.jar matches with v9.0.1.3 + patch
    v9.0.3 apapi.jar also matches with v9.0.1.4
    v9.0.2 apapi.jar matches with v9.0.1.3
    Hope this helps...
    John
    Hi,
    I tried to use OJMS/AQ as the JMS provider in OC4J 9.0.2 and OC4J 9.0.3. Resource providers in both the containers point to the same Oracle database (9.0.1.3.0) using the same user account.
    JMS works fine with OC4J 9.0.3 but not with OC4J 9.0.2.
    During the start-up of 9[i]Long postings are being truncated to ~1 kB at this time.

  • OC4J : configuring queues programmatically than in jms.xml file.

    Hi All,
    I'm using MDB-Queues and OC4J Scheduler in my application deployed in OC4J 10.1.3.1. I need to get rid of the dependency of "jms.xml" (under "<OC4J>\j2ee\home\config") where the queues are defined for the OC4J Scheduler. This is because, I cant always expect my client to add these entries into their app server setting. Can anyone please let me how this can be achieved..?
    Thanks
    Rajasekaran Iyanu

    hi,
    You can enter jms information in jms-server.xml which can be deploy with application and you dont need to configure AS .
    Regards

  • Problem: sending JMS message in other oc4j

    I have two app server instances " OC4J (1) " and " OC4J (2) ". (snandalone 10.1.3.0.0 - Developer Preview 3 (build 041119.0001.2385)). The containers work on Windows2000 in different machines connected by the LAN.
    OC4J (1):
    I have J2ee of the application [app(1)] (ex. Servlet (1) or MDB (1)) in OC4J (1).
    OC4J (2):
    I have J2ee of the application [app(2)] deploy in OC4J (2) [included Servlet (2) or MDB (2)] . The Servlet (2), or MDB (2) - empty stub, for example code Servlet2:
    package mypackage;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = " text/html; charset=windows-1251 ";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    out.println (" < p > The servlet has received a GET. This is the reply. </p > ");
    out.println (" < /body > < /html > ");
    out.close ();
    I have configuration JMS (2) Queue in jms.xml on OC4J (2):
    < jms-server...... port = "9127"
    < queue name = " Demo Queue " location = "jms/demoQueue" > <description> A dummy queue </description> </queue>
    < queue-connection-factory name = "jms/QueueConnectionFactory" location = "jms/QueueConnectionFactory" / >
    </jms-server>
    It JMS (2) Queue already is present in an OC4J 10.1.3 version.
    My task:
    The J2ee application (1) (ex. Servlet (1)) on OC4J (1) it is necessary to receive connection with JMS (2) (on remote OC4J (2)).
    Variant 1: a code in Servlet (1):
    Hashtable env=new Hashtable (8);
    env.put (Context. PROVIDER_URL, " ormi: // host_OC4J (2)/app(2):23792 ");
    env.put (Context. INITIAL_CONTEXT_FACTORY, " oracle.j2ee.rmi. RMIInitialContextFactory ");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put ("dedicated.connection", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)
    ic.lookup ("jms/QueueConnectionFactory");
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    queueSession =
    connection.createQueueSession (false, Session. AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup ("jms/demoQueue");
    ic.close ();
    while (true)
    // - send in JMS (2)
    Problem:
    The Servlet (1) [in oc4j (1)] established JMS connection with oc4j (2) and begins to pass the messages [in JMS Queue (2)].
    The Oc4j (2) creates some system thread for this JMS connection.
    If the oc4j (1) lose network connection (example- break the cable) then created in oc4j (2) system thread is not destroyed.
    Saw if this situation repeats some times that amount of the system thread in oc4j (2) is grow.
    To me has answered:
    In 10.1.3, the supported connection path is through the Resource Adapter (using OracleASjms.rar). The Resource Adapter offers many benefits, including the removal of stale connection threads. You have configured your application to bypass the Resource Adapter and use a direct path to OC4J JMS. You will need to create a resource mapping from your OC4J JMS admin objects (queues, topics, and connection factories) to new Resource Adapter admin objects. You can find the details of how to do this in the documentation for OC4J 10g (10.1.3) Developer Preview 3 on OTN.
    You can find the link to the documentation for OC4J DP3 here:
    http: // www.oracle.com/technology/tech/java/oc4 j/1013/index.html
    Then I have tried Variant 2:
    I need to receive connection with remote JMS (2) via generic JMS resource adapter (OracleAS Jms).
    In OC4J (2), it is necessary сonfigure the generic JMS resource adapter (OracleAS Jms) to work with Queue "jms/demoQueue".
    According to the documentation Oracle ® Containers for J2EE Services Guide10g Release 2 (10.1.3) and example
    http: // www.oracle.com/technology/tech/java/oc4 j/1013/howtos/how-to-jca-intro/doc/how- to-jca-intro.html anything it is not necessary to do.
    Note that if you use the generic JMS resource adapter in an OC4J 10.1.3 version that is newer than the OC4J 10.0.3 Developer Preview 2, you can skip. In OC4J 10.1.3 it is a step is already made.
    Code in Servlet (1):
    Hashtable env=new Hashtable (8);
    env.put (Context. PROVIDER_URL, " ormi: // host_OC4J (2) /app (2):23792 ");
    env.put (Context. INITIAL_CONTEXT_FACTORY, " oracle.j2ee.rmi. RMIInitialContextFactory ");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put ("dedicated.connection", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)
    ic.lookup (" java:comp/resource/oc4jjms/jms/QueueCon nectionFactory ");
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    queueSession =
    connection.createQueueSession (false, Session. AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (" java:comp/resource/oc4jjms/jms/demoQueu e ");
    ic.close ();
    while (true)
    // - send in JMS (2)
    This code works.
    But!!!!!!
    The problem - removal of stale connection threads in OC4J (2) instances has not solve. If the oc4j (1) lose network connection (example- break the cable) then created in oc4j (2) system thread is not destroyed.
    How to me to write a code of connection with JMS (2) in Servlet (1), that Resource Adapter (in OC4J (2)) the removal of stale connection threads ???

    I have two app server instances " OC4J (1) " and " OC4J (2) ". (snandalone 10.1.3.0.0 - Developer Preview 3 (build 041119.0001.2385)). The containers work on Windows2000 in different machines connected by the LAN.
    OC4J (1):
    I have J2ee of the application [app(1)] (ex. Servlet (1) or MDB (1)) in OC4J (1).
    OC4J (2):
    I have J2ee of the application [app(2)] deploy in OC4J (2) [included Servlet (2) or MDB (2)] . The Servlet (2), or MDB (2) - empty stub, for example code Servlet2:
    package mypackage;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = " text/html; charset=windows-1251 ";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    out.println (" < p > The servlet has received a GET. This is the reply. </p > ");
    out.println (" < /body > < /html > ");
    out.close ();
    I have configuration JMS (2) Queue in jms.xml on OC4J (2):
    < jms-server...... port = "9127"
    < queue name = " Demo Queue " location = "jms/demoQueue" > <description> A dummy queue </description> </queue>
    < queue-connection-factory name = "jms/QueueConnectionFactory" location = "jms/QueueConnectionFactory" / >
    </jms-server>
    It JMS (2) Queue already is present in an OC4J 10.1.3 version.
    My task:
    The J2ee application (1) (ex. Servlet (1)) on OC4J (1) it is necessary to receive connection with JMS (2) (on remote OC4J (2)).
    Variant 1: a code in Servlet (1):
    Hashtable env=new Hashtable (8);
    env.put (Context. PROVIDER_URL, " ormi: // host_OC4J (2)/app(2):23792 ");
    env.put (Context. INITIAL_CONTEXT_FACTORY, " oracle.j2ee.rmi. RMIInitialContextFactory ");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put ("dedicated.connection", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)
    ic.lookup ("jms/QueueConnectionFactory");
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    queueSession =
    connection.createQueueSession (false, Session. AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup ("jms/demoQueue");
    ic.close ();
    while (true)
    // - send in JMS (2)
    Problem:
    The Servlet (1) [in oc4j (1)] established JMS connection with oc4j (2) and begins to pass the messages [in JMS Queue (2)].
    The Oc4j (2) creates some system thread for this JMS connection.
    If the oc4j (1) lose network connection (example- break the cable) then created in oc4j (2) system thread is not destroyed.
    Saw if this situation repeats some times that amount of the system thread in oc4j (2) is grow.
    To me has answered:
    In 10.1.3, the supported connection path is through the Resource Adapter (using OracleASjms.rar). The Resource Adapter offers many benefits, including the removal of stale connection threads. You have configured your application to bypass the Resource Adapter and use a direct path to OC4J JMS. You will need to create a resource mapping from your OC4J JMS admin objects (queues, topics, and connection factories) to new Resource Adapter admin objects. You can find the details of how to do this in the documentation for OC4J 10g (10.1.3) Developer Preview 3 on OTN.
    You can find the link to the documentation for OC4J DP3 here:
    http: // www.oracle.com/technology/tech/java/oc4 j/1013/index.html
    Then I have tried Variant 2:
    I need to receive connection with remote JMS (2) via generic JMS resource adapter (OracleAS Jms).
    In OC4J (2), it is necessary сonfigure the generic JMS resource adapter (OracleAS Jms) to work with Queue "jms/demoQueue".
    According to the documentation Oracle ® Containers for J2EE Services Guide10g Release 2 (10.1.3) and example
    http: // www.oracle.com/technology/tech/java/oc4 j/1013/howtos/how-to-jca-intro/doc/how- to-jca-intro.html anything it is not necessary to do.
    Note that if you use the generic JMS resource adapter in an OC4J 10.1.3 version that is newer than the OC4J 10.0.3 Developer Preview 2, you can skip. In OC4J 10.1.3 it is a step is already made.
    Code in Servlet (1):
    Hashtable env=new Hashtable (8);
    env.put (Context. PROVIDER_URL, " ormi: // host_OC4J (2) /app (2):23792 ");
    env.put (Context. INITIAL_CONTEXT_FACTORY, " oracle.j2ee.rmi. RMIInitialContextFactory ");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put ("dedicated.connection", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)
    ic.lookup (" java:comp/resource/oc4jjms/jms/QueueCon nectionFactory ");
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    queueSession =
    connection.createQueueSession (false, Session. AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (" java:comp/resource/oc4jjms/jms/demoQueu e ");
    ic.close ();
    while (true)
    // - send in JMS (2)
    This code works.
    But!!!!!!
    The problem - removal of stale connection threads in OC4J (2) instances has not solve. If the oc4j (1) lose network connection (example- break the cable) then created in oc4j (2) system thread is not destroyed.
    How to me to write a code of connection with JMS (2) in Servlet (1), that Resource Adapter (in OC4J (2)) the removal of stale connection threads ???

  • JMS data server  creation , parameters?

    hi,
    can anybody plz tell how to create jms queue dataserver in ODI.
    I have already created JMS data server in Weblogic 8.1.
    I'm using LDAP protoclol..
    Plz give the format of JNDI url and JNDI resource .
    I'm using JMS Queue ..Not JMS Queue XML ..
    Thanks a lot in advance ..
    user568....delhi

    Find below the process to configure a JMS destination for OC4J.
    You will need to adapt it to you JMS provider.
    To set this up, you will need to:
    1. Copy the necessary client files from OC4J, place them in the <ODI_HOME>/oracledi/drivers directory and restart ODI. The files you need are:
    - <OC4J_HOME>/j2ee/home/oc4jclient.jar
    - <OC4J_HOME>/j2ee/home/lib/javax77.jar
    - <OC4J_HOME>/j2ee/home/lib/jta.jar
    Copy those files and restart ODI.
    2. Create a physical connection (Topology Application/Physical Architecture/Technologies -> right click JMS Queues and select "Insert Data Server")
    3. In the Description tab, simpl fill in the Name field.
    4. In the JNDI tab , fille in the following:
    - JNDI Authentication - Simple
    - JNDI User: application user - this is the equivalent of javax.naming.Context.SECURITY_PRINCIPAL
    - Password: application password - this is the equivalent of javax.naming.Context.SECURITY_CREDENTIALS
    - JNDI Driver: This is the equivalent of javax.naming.Context.INITIAL_CONTEXT_FACTORY, so enter com.evermind.server.rmi.RMIInitialContextFactory
    - JNDI Url: This is the equivalent of javax.naming.Context.PROVIDER_URL, so put in ormi://<hostname>[:<port>]/<application>.
    For instance, with the basic OC4J install, I put in ormi://localhost/default.
    - JNDI Resource: This is the JNDI lookup key for your Queue Connection factory.
    For example, for the default OC4J installation, I put in jms/QueueConnectionFactory
    5. Click the Test button and click OK in the window that pops up. You should get a message box saying that your connection was successful.
    6. Click Apply or OK and a new window will pop up. In this window, go to the Context tab and click the Add button and in the row that appears, click on the right most field (it says <Undefined> and replace <undefined> with a logical name for your connection. Hit Enter and click OK)
    7. You've now connected to the Queue, to create the Queue object in ODI, go to the Designer window, go to models and create a new model.
    8. Set the name to whatever makes sense to you. Set the technology to JMS Queue and the Logical Schema to the logical connection name you created in step 6. In the Reverse tab, select Global from the Context dropdown menu.
    9. Click OK. You now have a container for any Queues that are in this connection.
    10. To point to the queue, right click your new model and select Insert Datastore.
    11. In the new window, name your datastore whatever you'd like. Set the resource name to the JNDI resource name for the queue (for example, with the default OC4J configuration, you could set this to jms/demoQueue.
    12. In the Files tab, set the File Format to fixed, and set the record separator to Windows or Unix (it doesn't really matter which one you pick)
    13. In the Columns tab, click the add button to add a column. Name the column something like DATA and set is to a String of size 1000.
    14. Click OK. You'll now be able to right click this new datastore and view data, granted in a very simple format. You can create a more complex flat file structure if you' like but this gives you a quick and easy to view the contents of the queue.
    Regards,
    -FX

  • Create EJB 3.0 Message Driven Bean on a Oracle JMS (AQ)

    Hi, I need to develop a EJB 3.0 Message Driven Bean. The MDB has to work on a Oracle AQ using Oracle JMS. Is there any how-to document giving an example about this issue. Can you give an example how to create the JMS destination in OC4J (how to configure the Oracle JMS AQ in OC4j), issue the JMS destination via annotions (resource injection) in the MDB. Please give me a working example of the MDB and a test client to produce a message. Regards, Arjan Jorritsma

    Check your ejb-jar.xml and see if it has the version of "2.1" there...
    If the application was depending upon EJB 3.0 annotations but it had a ejb-jar.xml that had version set to "2.1" and there was no oracle specific descriptor (orion-ejb-jar.xml) to designate it use the resource adapter; It would expect JMS destination and connection factory that is required for a JMS-MDB set in the ejb-jar.xml. So try to change the ejb-jar.xml to update the version to "3.0", OC4J would have parsed the annotation and combined the metadata with ejb-jar.xml and it would work.
    -Frances

  • AQ & Message Bean in OC4J 9.0.2

    Despite all the confusion, I finally got 9.0.2 to work with AQ in a 8.1.7 database. Some of the standard JMS features are not supported by 9.0.2, but in my case I get what I needed: publish a msg using a standalone java class and receive it from a MDB.
    However, there are a few issues remain outstanding.
    1. Ever since I put the <resource-provider> in application.xml for AQ, the OC4J process refuse to shutdown by admin.jar -shutdown. I have to ctrl-C out of it and clean up the persistence myself. This is on Windows, not sure if the same on UNIX.
    2. Deployment from Jdeveloper 9.0.2 is awefully slow, and many times the process will hang without any results.
    3. Every time OC4J starts without a message in the queue, I got the following exception in OC4J console:
    java.lang.NullPointerException
    void com.copyright.delivery.DeliveryMDB.onMessage(javax.jms.Message)
    void com.evermind.server.ejb.MessageDrivenBeanInvocation.run()
    void com.evermind.util.ThreadPoolThread.run()
    4. When OC4J restarts, the MDB always gets the last message again. (Could this be the issue of not cleanly shutdown?)
    Do any of you know these problems and have a solution?
    Thank you!

    Hi Balaji,
    What most likely is happening is that you have mismatched versions of apapi.jar (client side) and the database, thus the reason for the "invalid arguments in call" error you're seeing.
    If you're using 9.0.1.3 of the database it should be patched with patch #2416054. Go to Metalink and do a search for this patch to find it. You can then use the apapi.jar that comes with the patched version of the DB or the apapi.jar that comes with v9.0.3.
    By the way, v9.0.3 and 9.0.1.3 + patch is a J2EE 1.3 compatible JMS server.
    I'm guessing that you used the apapi.jar that came with v9.0.2 with the v9.0.1.3 database and that you've probably already applied the above patch. If you have then just take the apapi.jar that came with v9.0.3 and use it in your v9.0.2 environment.
    In short:
    v9.0.3 apapi.jar matches with v9.0.1.3 + patch
    v9.0.3 apapi.jar also matches with v9.0.1.4
    v9.0.2 apapi.jar matches with v9.0.1.3
    Hope this helps...
    John
    Hi,
    I tried to use OJMS/AQ as the JMS provider in OC4J 9.0.2 and OC4J 9.0.3. Resource providers in both the containers point to the same Oracle database (9.0.1.3.0) using the same user account.
    JMS works fine with OC4J 9.0.3 but not with OC4J 9.0.2.
    During the start-up of 9[i]Long postings are being truncated to ~1 kB at this time.

Maybe you are looking for