Resource Ref. Mapping

Hello,
I've created a data source in the data-sources.xml, mapped it in the orion-ejb-jar.xml and i look it up under the JNDI name java:comp/env/jdbc/MyDS and it all works fine.
When I put another data source and I do the mapping the same way, it looks the first data source defined in data-sources.xml. If there is only one data source (either one), it works fine, but if there is more than one data source, it looks the first one up.
If i look them up with the actual name (ejb-location defined in data-sources.xml), it works fine. Does anyone have any thoughts?
Thanks.
Luiz.

Hello Sugu,
I've made a spelling mistake:
WorkflowContollerTopic vs WorkflowControllerTopic
This works:
java:comp/resource/QT_Topic/Topics/WorkflowContollerTopic
Therefore your 'Topics' solution is correct (Thanks!).
But now I've got a new problem:
ORA-06550: Regel 1, kolom 7:
PLS-00306: Onjuist aantal of type argumenten in aanroep naar 'AQ$_JMS_ENQUEUE_OBJECT_MESSAGE'..
ORA-06550: Regel 1, kolom 7:
PL/SQL: Statement ignored.
I've executed the following script (ignore the spelling error):
BEGIN
DBMS_AQADM.CREATE_QUEUE_TABLE(
Queue_table => 'QT_Topic',
Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',
multiple_consumers => true);
END;
EXEC DBMS_AQADM.CREATE_QUEUE(
'WorkflowContollerTopic','QT_Topic');
EXEC DBMS_AQADM.ADD_SUBSCRIBER(
'WorkflowContollerTopic', sys.aq$_agent('MDSUB', null, null));
EXEC DBMS_AQADM.START_QUEUE ('WorkflowContollerTopic');
Regards,
Marteyn Heijlaerts

Similar Messages

  • How to map a resource-ref in Jdev11 deployment plan editor

    Hi all,
    I have a ADF/BC web application where the BC4J application module does connect to a JNDI data source.
    The ViewController project does declare the Datasource as needed resource in its web.xml:
    <resource-ref>
    <res-ref-name>jdbc/wlogDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    Now i need to map that resouurce-ref to an actual data source that exist in the application container at deploy time.
    As already in JDev 10.1.3 the deployment-plan editor provided during deployment from JDeveloper does not provide any means to enter the deployment mapping for that resourc-ref (When clicking on the node (which is named resouce-ref - that becomes very confusing in case you have defined three resource-refs in your web.xml) the right pane shows a gray pane without any edit controls) So I cannot enter the resource-ref-mapping unsing the Jdev UI.
    My workaround in 10.1.3 was to save the deployment plan to disk and manually edit it, adding
    <resource-ref-mapping name="jdbc/wlogDS" location="jdbc/wlogTestEnvDS">
    </resource-ref-mapping>
    to the orion-web-app document for that webapp
    But in Jdev 11 the deployment plan file format changed (including some binary inline checksums???)and when doing exactly the same thing, the loading of the manually edited file into Jdev Deployment plan editor fails with
    oracle.oc4j.admin.deploy.spi.exceptions.ExtendedConfigurationException: invalid entry size (expected 1886413103 but got 846 bytes)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:1002)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
         at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
         at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: invalid entry size (expected 1886413103 but got 846 bytes)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:240)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
         ... 33 more
    Caused by: java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
         at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
         at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
         at java.util.jar.JarInputStream.read(JarInputStream.java:171)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
         ... 35 more
    oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: invalid entry size (expected 1886413103 but got 846 bytes)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:240)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
         at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
         at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Caused by: java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
         at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
         at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
         at java.util.jar.JarInputStream.read(JarInputStream.java:171)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
         ... 35 more
    ---- Embedded exception
    java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
         at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
         at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
         at java.util.jar.JarInputStream.read(JarInputStream.java:171)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
         at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
         at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
         at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
         at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:515)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    So no chance here to add a resource-ref-mapping. The alternative way of specifying a resource-ref-mapping using the web-based deployment proces of the Enterprise manager is impossible because the 11g preview OC4j does not include an enterprise manger web-application.
    So how do I deploy the application correctly other that manually modifying the deployed orion-web-app.xml file in j2ee/home/application-deployments/earName/warName/orion-web-app.xml after deploying the app without a resource-ref-mapping? Because doing that step manually each time is quite annoying.
    Greetings,
    Thomas

    Seems i'm slowly answering my own questions :-) I finally got my RMI service, even using several methods. But ...
    It doesnt help me as the lookups are not done on the context classloader it seems. That means i need to add all my service jars to the global class path causing massive sealing issues with the war contained jars. Pretty useless. All the needed stubs etc are in the war.
    But as it seems that the web app needs to contain deployment site info (sun-web.xml) anyway, i could just as easy read my own web xml from the context and resolve the services myself. But i do wonder how this is supposed to work with EJB and CORBA stuff. The samples actually also needed to add stuff to the global class path.
    I'm probably not the easiest customer as i write this kind of middle ware for a living but i really like sjsws. It makes my own one partly obsolete as it is almost as fast and has all the fancy deployment stuff (in my case i use an in-house mobile agent frame work and agents that travel the various networks ) and infinitely easier to learn to work with and understand In case anyone is wondering i wrote Uhura because 1. i needed speed so it is a servlet based webserver and not a web server with a servlet module. 2. could not wait on ibm to fix bugs in webspere and we only used the servlet bit. 2. i needed full J2EE security and 3. i needed it to run on many OS'es
    That is why i still need the same war files to be able to be deployed in both systems as i still need my systems going on IBM iservers etc.
    Again i would welcome some feed back on such and related issues
    Cheers,
    Peter

  • Orion-web.xml and resource-env-ref-mapping correct usage

    What happened to resource-env-ref-mapping element in orion-web.xml? I have a 9.0.4.1 server running several .EAR files containing web applications using this attribute to configure JMS related items. But when deploying the .EAR to newer versions (9.0.5.2) of the server this attribute doesn't appear to be valid any longer?
    Here it is in the 9.0.4 documentation:
    http://strogoff.unex.es/oradoc/form_y_report_10g/web.904/b10322/apdx_a.htm
    Any help would be appreciated?

    I should have been more clear about the issue. The error only occurs when running inside the embedded OC4J container of JDeveloper 10.1.2 build 1913. The error does NOT occur in JDeveloper 9.0.3. The application also runs fine when deployed to a 10.1.2 Enterprise application server. The error only occurs in JDeveloper.
    The following error occurs when validating my orion-web.xml file. The entry is:
    orion-web.xml:
    <orion-web-app>
    <resource-ref-mapping name="jms/mQueueConnectionFactory" location="jms/matchingQueueConnectionFactory"/>
    <resource-env-ref-mapping name="jms/mQueue" location="jms/matchingQueue"/>
    </orion-web-app>
    web.xml
    <resource-env-ref>
    <resource-env-ref-name>jms/mQueue</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
    </resource-env-ref>
    java.lang.IllegalArgumentException: Unrecognized parent-elem combination: interface oracle.jdeveloper.xml.oc4j.war.OrionWebApp - resource-env-ref-mapping
         at oracle.javatools.xml.bind.XMLBinding.throwUnrecognizedElem(XMLBinding.java:127)
         at oracle.jdeveloper.xml.j2ee.war.WebAppBinding.elem2intImpl(WebAppBinding.java:637)
         at oracle.javatools.xml.bind.XMLBinding.elem2int(XMLBinding.java:104)
         at oracle.javatools.xml.bind.XMLBinding.insertBetween(XMLBinding.java:88)
         at oracle.javatools.xml.bind.BindingContext.insertNewElement(BindingContext.java:121)
         at oracle.javatools.xml.bind.BindingContext.insertElem(BindingContext.java:95)
         at oracle.javatools.xml.bind.BindingContext.setElement(BindingContext.java:71)
         at oracle.javatools.xml.bind.SetImpl.callSetterForUniqueElem(SetImpl.java:66)
         at oracle.javatools.xml.bind.SetImpl.callSetter(SetImpl.java:57)
         at oracle.javatools.xml.bind.SetImpl.invoke(SetImpl.java:26)
         at oracle.javatools.xml.bind.ElementProxy.invoke(ElementProxy.java:35)
         at $Proxy10.setWebApp(Unknown Source)
         at oracle.jdevimpl.runner.oc4j.Oc4jWorkspaceConfig.ensureLocalPageReposRootIsSet(Oc4jWorkspaceConfig.java:633)
         at oracle.jdevimpl.runner.oc4j.Oc4jWorkspaceConfig.transmogrifyConfigFiles(Oc4jWorkspaceConfig.java:269)
         at oracle.jdevimpl.runner.oc4j.Oc4jWorkspaceConfig.configureAll(Oc4jWorkspaceConfig.java:114)
         at oracle.jdevimpl.runner.oc4j.Oc4jStarter.preStart(Oc4jStarter.java:618)
         at oracle.jdevimpl.runner.oc4j.Oc4jStarter.start(Oc4jStarter.java:268)
         at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:756)
         at oracle.jdeveloper.runner.JRunProcess.startTarget(JRunProcess.java:461)
         at oracle.ide.runner.RunProcess$2.run(RunProcess.java:699)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • "message-destination-ref-mapping" definition in EJB3.0 style annotation

    Hello,
    Here is how I used to define "resource-ref-mapping" and "message-destination-ref-mapping" in ejb 2.1
    <resource-ref-mapping
    location = "MQJMSRASubcontext/MyQCF"
    name = "jms/MQConnectionFactory"/>
    <message-destination-ref-mapping
    location = "MQJMSRASubcontext/MQQ"
    name = "jms/MQQQueueDestination"/>
    I want to do define these two properties in ejb3.0 using annotation. Any help will be much appreciated.
    Thanks,
    Mustafa

    Hello,
    Here is how I used to define "resource-ref-mapping" and "message-destination-ref-mapping" in ejb 2.1
    <resource-ref-mapping
    location = "MQJMSRASubcontext/MyQCF"
    name = "jms/MQConnectionFactory"/>
    <message-destination-ref-mapping
    location = "MQJMSRASubcontext/MQQ"
    name = "jms/MQQQueueDestination"/>
    I want to do define these two properties in ejb3.0 using annotation. Any help will be much appreciated.
    Thanks,
    Mustafa

  • Topic  'resource-env-ref-mapping'

    I get the following exception:
    javax.naming.NamingException: Error creating context: No resource named 'XXXX/WorkflowControllerTopic' found in resource provider 'QT_Topic'
    orion-ejb-jar.xml:
    <resource-env-ref-mapping name="jms/MyTopic"
    location="java:comp/resource/QT_Topic/XXXX/MYTopic" />
    What should I use for 'XXXX'? I've tried the following options
    1) Topics
    2) Topic
    3) Queues
    Regards,
    Marteyn

    Hello Sugu,
    I've made a spelling mistake:
    WorkflowContollerTopic vs WorkflowControllerTopic
    This works:
    java:comp/resource/QT_Topic/Topics/WorkflowContollerTopic
    Therefore your 'Topics' solution is correct (Thanks!).
    But now I've got a new problem:
    ORA-06550: Regel 1, kolom 7:
    PLS-00306: Onjuist aantal of type argumenten in aanroep naar 'AQ$_JMS_ENQUEUE_OBJECT_MESSAGE'..
    ORA-06550: Regel 1, kolom 7:
    PL/SQL: Statement ignored.
    I've executed the following script (ignore the spelling error):
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'QT_Topic',
    Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',
    multiple_consumers => true);
    END;
    EXEC DBMS_AQADM.CREATE_QUEUE(
    'WorkflowContollerTopic','QT_Topic');
    EXEC DBMS_AQADM.ADD_SUBSCRIBER(
    'WorkflowContollerTopic', sys.aq$_agent('MDSUB', null, null));
    EXEC DBMS_AQADM.START_QUEUE ('WorkflowContollerTopic');
    Regards,
    Marteyn Heijlaerts

  • Adding resource-ref  in web.xml

    dos it make any difference adding
         <resource-ref>
               <description>Application Datasource </description>
               <res-ref-name>jdbc/myDataSource</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
         </resource-ref>inside web.xml , it works with or without , please tell me the importance of this

    The optional resource-ref element defines a reference lookup name to an external resource. This allows the servlet code to look up a resource by a "virtual" name that is mapped to the actual location at deployment time.
    http://www.chariotsolutions.com/geronimo/geronimo-1.1/database-mapping.html

  • Some doubts in using resource-ref,connection pool n Data-source

    Hi all ,
    I need little bit clarification in the following points.
    1) Does the connection pool which is created can be displayed in JNDI Tree???
    I am seeing only DataSOurce in the JNDI Tree Only.
    2)In case of Bean Managed Persistance, in ejb-jar.xml,
    I had given the following info.
    <resource-ref>
             <res-ref-name>ramukkDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
         </resource-ref>Does the <res-ref-name> refers to Datasource Name??
    In weblogic-ejb-jar.xml
    <reference-descriptor>
           <resource-description>
              <res-ref-name>ramukkDataSource</res-ref-name>
              <jndi-name>ramukkpool</jndi-name>
           </resource-description>
         </reference-descriptor>Here <jndi-name> refers to connection pool as per weblogic bible book.
    If so when i deployed my ejb into the server iam getting Datasource cant be found.
    If i had given like the following,
    In ejb-jar.xml
    <resource-ref>
              <res-ref-name>jdbc/ramuJndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref> In weblogic-ejb-jar.xml
         <reference-descriptor>
              <resource-description>
               <res-ref-name>jdbc/ramuJndi</res-ref-name>
               <jndi-name>jdbc/ramuJndi</jndi-name>
           </resource-description>
        </reference-descriptor>Then only my ejb code is successfully deploying doing some work which is as per xpectation.
    Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
    I am working on this problem from last one week. Still not found the solution.
    Connection Pool Creation
    GENERAL::
    Name : ramukkpool
    url : jdbc:mysql://localhost:3306/test
    Driver Classname: com.mysql.jdbc.Driver
    Properties :
    user = root
    Password = XXX
    create
    TARGETS::
    i had shifted myServer from left side to right side n clicked >>Apply
    (Techncially can we say this as deploying the connection pool into server ???????????
    If not how to deploy the connection pool into server??)
    I did not get any errors in the console.
    Now i am creating a datasource
    CONFIGURATION:
    Name : ramukkDataSource
    JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
    PoolName: ramukkpool
    create
    TARGETS::
    I had shifed myServer from left to right n >>Apply.
    Now also i did not get any errors in the console.Thanx(in advance),
    ramu

    I have read the documentation.
    I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
    My question still remains unanswered, could some kindly help.
    Q? I have defined a data source in JDeveloper using
    oracle.jdbc.pool.OracleConnectionCacheImpl
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
         }}

  • Message Driven Bean - Resource Ref

    hi
    Can anyone guide me with the steps in creating the resource ref in the Message Driven bean. When i run i get the following
    C:\Sun\Projects\simple>appclient -client MSBApplicationClient.jar
    JNDI lookup failed: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MyQcf
    My set up is like this
    Connection Factory jms/MyQcf
    Destination Resource jms/MyQueue
    Physical Destination PhysicalQueue
    I am using the deploy tool for sun java system application server platform edition 8.
    I have created a application and within which the MessageDrivenBean is an "Enterprise Bean" and the client is "Application Client"
    and the contents of MSBApplicationClient.Jar is therefore
    C:\Sun\Projects\simple>c:\sun\appserver\jdk\bin\jar -tf MSBApplicationClient.jar
    META-INF/sun-j2ee-ri.project
    SimpleMessageClient.class
    app-client-ic.jar
    samples/ejb/mdb/simple/ejb/SimpleMessageBean.class
    ejb-jar-ic.jar
    .com.sun.deployment.backend.lock
    META-INF/application.xml
    META-INF/sun-application.xml
    Please someone help

    http://docs.sun.com/source/819-0079/dgacc.html

  • Resource Ref's settings of a CMP bean in SAS PE 8.2 - Deploytool

    Dear all,
    In the deploytool of SAS8.2, in the [Resource Ref's] tab of a CMP bean do I need to set anything here to enable the CMP bean to connect to the database?
    I already have a JDBC source registered in the server and it is called jdbc/mydatasource.
    Thanks in advance.

    Problem solved. For CMP beans, I just need to set the JNDI name of the CMP resource and this name corresponds to the JNDI name of the the JDBC resource registered in the SAS.
    But for BMP beans, I will have to add an entry in the [Resource Ref's] tab. The [Coded name] corresponds to the JNDI name used in the code to look up this JDBC resource.
    Thanks all.

  • Resource-ref binding

    i'm using the weblogic ejb server. i currently have a datasource configured with a jndi name of myDS. i have some stateless session beans using a resource-ref to access the datasource. i'm not a jndi expert at all, but i think jboss by default binds the datasources to the java:/ area. weblogic configuration seems to make the datasource publicly available to anyone who knows the jndi name of the datasource. without the boggling security stuff on weblogic, is it simply able to bind the datasource to the java:/ area? am i wrong in thinking that this will provide some reduced visibility of the datasource?
    thanks!

    I don't know about your app servers, I use WebSphere,
    but having a res ref to a datasource doesn't limit the
    visibility of the datasource simply to the
    java:comp/env context - it simply provides a handy
    alias for the full JNDI name. You can access the
    datasource via the fully qualified JNDI name as well.It is the same for all app. servers. Resource-ref just creates an alias of a JNDI resource, but you can always lookup the object using full JNDI name.
    Resource references are available only in that component which has those references declared, but everyone can use full JNDI name.

  • Ejb-ref-mapping in orion-ejb.jar missing location attribute after deployment

    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.

    If the 'location' value is same as the 'name' value, then even though the location attribute is missing, it is ok and should work. If they are not the same, then you should have defined the ejb-link element in your ejb-jar.xml when defining this ejb-ref and that would make the location attribute appear in the generated orion-ejb-jar.xml.
    If the referenced bean is from a different application (EAR), then you should have used the -parent option when deploying the application.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kris Trujillo ([email protected]):
    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.<HR></BLOCKQUOTE>
    null

  • Looking up Managed ConnectionFactory by JNDI Resource-Ref

    Thank you in advance for your help...
    I'm writing an Enterprise Java Bean using WebLogic Workshop that needs
    to access a connection factory defined in a deployed Resource Adapter.
    I'm trying to access the server managed connection factory through the
    use of a resource-reference defined in the EJB file.
    The resource ref is defined in the EJB header:
    * @ejbgen:resource-ref
    * sharing-scope="Shareable"
    * auth = Container
    * jndi-name = Target_7
    * name = db/cf/Target
    * type = javax.resource.cci.ConnectionFactory
    * @ejbgen:session type="Stateless" default-transaction="NotSupported"
    * ejb-name = "UberPhoneBook"
    * @ejbgen:jndi-name
    * remote = "ejb.UberPhoneBookRemoteHome"
    * @ejbgen:file-generation remote-class = "true" remote-class-name =
    "UberPhoneBookRemote" remote-home = "true" remote-home-name =
    "UberPhoneBookHome" local-class = "false" local-class-name =
    "UberPhoneBookLocal" local-home = "false" local-home-name =
    "UberPhoneBookLocalHome"
    And the lookup is done in the EJB code:
    private void initialize() {
    if( this.initialized ) return;
    try {
    // Lookup the ConnectionFactory we should be using
    InitialContext initCntx = new InitialContext();
    ConnectionFactory cf = (ConnectionFactory) initCntx.lookup(
    "db/cf/Target" );
    this.conn = (Connection) cf.getConnection();
    this.initialized = true;
    } catch( Exception e ) {
    throw new EJBException(e);
    But I'm running into problems. My lookup results in a Name Not Found
    Exception, and I can't find my resource reference in the JNDI namespace.
    I'm using the bean in a JSP page, and it is declared in the usebean tag.
    Any ideas what my problem could be coming from?
    Thanks,
    Chris M.

              Hi!
              Did you deploy your rar file? Which jndi name has the connector?
              If you use a reference try "java:comp/env/" as prefix. Would be helpful if you
              cut the passage about the reference from your ejb-jar.xml and weblogic-ejb-jar.xml
              file and post it.
              CU
              Chris
              

  • What's the actual function of resource-ref in web.xml

    I was configuring JNDI datasource in tomcat and found an confusing fact.
    If I have the JNDI resource configuration in the context configuration of the project, I could get access to the JNDI element with or without the resource-ref configuration in my web.xml.
    Can someone tell me what exactly resource-ref does in the web application?
    Thank you.

    Thank you, Sunny.
    But I still don't quite understand.
    In Tomcat, this <resource-ref> seems to be optional, right?
    Plus, there should be a virtual name and actual location in the configuration.
    <resource-ref>
    <description>Resource reference to a factory for java.sql.Connection.</description>
    <res-ref-name>jdbc/mydb</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    So, is "jdbc/mydb" the virtual name or the actual location of the resource?

  • What's resource-ref for?

    I'm a JNDI newbie, so I hope this isn't too dumb. :-)
    I have a web app that I'm running in Tomcat 4.1.10 against a MySQL database. The app gets the DB using JNDI as described in the JNDI howto that comes with Tomcat. Everything works fine. Question is this: when I remove the <resource-ref> element from web.xml and restart the server, it still runs fine--yet every set of instructions I've seen on using JNDI from Tomcat says that I need to have <resource-ref> in web.xml. What's it for?
    Thanks,
    Willie

    Here's my take:
    The JNDI binding are done when the Tomcat parses server.xml.
    The resource-ref is used to declare to the container how the application is going to use the named resource. The container will 'default' to a standard use; say 'Container' authentication and 'Shareable' which it will use if there are no overides provided in web.xml.
    Each application can overide this 'default' behavior by specifying the appropriate settings for <res-auth> and <res-sharing-scope>.
    Just an educated guess.
    Dave

  • Unable To lookup .... weblogic.jobscheduler  and  web-xml resource ref

    Unable To lookup .... weblogic.jobscheduler and web-xml resource ref for timer manager
    JNDI NameNotFound Exception ....
    Do, i need to configure something get that working.
    Didn't find any thing on documentation or hosted examples.

    The default timermanager can be refered to as follows:
    <resource-ref>
        <res-ref-name>tm/default</res-ref-name>
        <res-type>commonj.timers.TimerManager</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>http://middlewaremagic.com/weblogic/?p=5569

  • Difference between resource-ref and resource-env-ref ?

    Hello,
    Can anyone tell me what the difference is between <resource-ref> and <resource-env-ref>? (in ejb-jar.xml)
    Thanks in advance,
    Julien Martin.

    Check out this URL. You will find out your answer.
    http://docs.sun.com/source/816-7156-10/agj2eres.html
    Thanks

Maybe you are looking for

  • Strange backdrop on transparent windows with xcompmgr and i3

    Hi there! I have disabled title bars in my i3 config, and I use xcompmgr for a little transparency. However, in the space where the title bar would be, garbage is visible behind the transparent backround of some windows. Any ideas? I tried a few othe

  • Can't Scan from HP Officejet 7580

    Can't scan from my HP Officejet 7580. Use to work just fine, and I have not changed anything I can think of that would affect it. Now I get message "Unexpected Internal Error Has Occurred". I did all the suggested solutions...checked all connections,

  • Mandrake Linux 8.0 - can't get Oracle Universal Installer to run

    Hi all. I'm having trouble getting Oracle's Universal Installer to run. I'm trying to become DBA certified, so I went and purchased (among other materials) a book titled "Oracle8i for LINUX Starter Kit", authored by Steve Bobrowski, published by Orac

  • How to store jsp session data of different user in util.hashmap

    how to store jsp session data of different user in java.util.hashmap and access the data of all user on the server side The same example is given in professional jsp but its not working. I can use getIds() of httpsessioncontext but it's depricated

  • Is there a way to disable nepomukindexer completely?

    I have some large pdfs which trigger some nepomukindexer processes every time I open their containing folder with dolphin. I have already disabled everything related to nepomuk in systemsettings but these nepomukindexer processes continue to show up.