How do I use a JNDI datasource in my application?

Not sure how to access the JNDI datasource i setup in my config.xml. I tried to browse it at rmi://localhost:1099/ but it only shows jmxrmi in the tree.
My config.xml looks like
<n1:config xsi:schemaLocation="http://www.bea.com/ns/wlevs/config/server wlevs_server_config.xsd" xmlns:n1="http://www.bea.com/ns/wlevs/config/server" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <netio>
    <name>NetIO</name>
    <port>9002</port>
  </netio>
  <work-manager>
    <name>JettyWorkManager</name>
    <min-threads-constraint>5</min-threads-constraint>
    <max-threads-constraint>10</max-threads-constraint>
  </work-manager>
  <jetty>
    <name>JettyServer</name>
    <network-io-name>NetIO</network-io-name>
    <work-manager-name>JettyWorkManager</work-manager-name>
  </jetty>
  <rmi>
    <name>RMI</name>
    <http-service-name>JettyServer</http-service-name>
  </rmi>
  <jndi-context>
    <name>JNDI</name>
  </jndi-context>
  <exported-jndi-context>
    <name>exportedJndi</name>
    <rmi-service-name>RMI</rmi-service-name>
  </exported-jndi-context>
  <jmx>
    <jndi-service-name>JNDI</jndi-service-name>
    <rmi-service-name>RMI</rmi-service-name>
    <rmi-registry-port>1099</rmi-registry-port>
    <rmi-jrmp-port>9999</rmi-jrmp-port>
  </jmx>
  <transaction-manager>
      <name>transactionmanager</name>
      <!--max-resource-requests-on-server>1</max-resource-requests-on-server>
      <max-resource-unavailable-millis>1000</max-resource-unavailable-millis-->
  </transaction-manager>
  <data-source>   
      <name>hqsqlconn</name>   
      <driver-params>     
        <url>jdbc:hsqldb:hsql://localhost/wlevdb</url>
        <driver-name>org.hsqldb.jdbcDriver</driver-name>
        <properties>
          <element>
            <name>user</name>
            <value>sa</value>
          </element>
          <element>
            <name>password</name>
            <value></value>
          </element>
        </properties>
        <use-xa-data-source-interface>true</use-xa-data-source-interface>   
      </driver-params>   
      <connection-pool-params>     
        <initial-capacity>1</initial-capacity>     
        <max-capacity>5</max-capacity>     
        <test-table-name>test_table</test-table-name>   
      </connection-pool-params>   
      <data-source-params>     
        <jndi-names>
          <element>hqsqlconn</element>
        </jndi-names>
        <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
      </data-source-params> 
  </data-source>
</n1:config>

I see what you are saying.
The JNDI approach should work-we will try to reproduce this internally.
I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
There are a couple of options.
If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
You can also put the following in your spring application context file
<osgi:reference id="myDataSource"
interface="javax.sql.DataSource"/>
This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
http://www.springframework.org/osgi/specification
(Look in section 3.3)
Hope that helps.
Seth
Edited by swhite at 08/01/2007 6:19 PM

Similar Messages

  • How can WLS use JSP pages in a Web Application witth just a JRE [Web Application, WAR, JSP, weblogic.jsp.pageCheckSeconds and JRE]

              How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
              I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
              Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
              On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
              D:\war>jar -tf gmi.war
              META-INF/
              META-INF/MANIFEST.MF
              gmiService.jsp
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/bt/
              WEB-INF/classes/com/bt/gmi/
              WEB-INF/classes/com/bt/gmi/gmiService.class
              WEB-INF/getList.xsl
              WEB-INF/getListByConnection.xsl
              WEB-INF/getListByDistrict.xsl
              WEB-INF/getListByDistrictConnection.xsl
              WEB-INF/lib/
              WEB-INF/source/
              WEB-INF/source/build.bat
              WEB-INF/source/gmiService.java
              WEB-INF/web.xml
              WEB-INF/weblogic.xml
              tmpwar/
              tmpwar/jsp_servlet/
              tmpwar/jsp_servlet/_gmiservice.class
              tmpwar/jsp_servlet/_gmiservice.java
              When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
              weblogic.jsp.pageCheckSeconds
              -1
              weblogic.jsp.precompile
              false
              weblogic.jsp.compileCommand
              javac
              weblogic.jsp.verbose
              true
              weblogic.jsp.packagePrefix
              jsp_servlet
              weblogic.jsp.keepgenerated
              false
              And in the weblogic.properties file:
              weblogic.httpd.webApp.gmi=war/gmi
              I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
              Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
              Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
              Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              

    The default Java compiler from sun lives in the tools.jar that comes with
              the JDK. Just add that to your set of JARs which are deployed in production
              and you should be fine. No need to install the full JDK - just make the
              tools.jar available to WebLogic.
              Regards
              James
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Martin Webb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > How can WLS use JSP pages in a Web Application (either a .war file or a
              war directory structure) without a java compiler?
              >
              > I suspect either the JSP specification is flawed (i.e. it doesn't take
              account of servers using just a JRE), or BEA's implementation is broken.
              >
              > Production servers do not have a JDK installed. They only have a JRE.
              Therfore a java compiler is not present on the machine that the Web
              Application is deployed onto.
              >
              > On the development machine, when the server is requested to load the JSP
              it creates a tmpwar directory within the Web Application directory
              structure. This is then included in the resultant .war file thus:
              >
              > D:\war>jar -tf gmi.war
              > META-INF/
              > META-INF/MANIFEST.MF
              > gmiService.jsp
              > WEB-INF/
              > WEB-INF/classes/
              > WEB-INF/classes/com/
              > WEB-INF/classes/com/bt/
              > WEB-INF/classes/com/bt/gmi/
              > WEB-INF/classes/com/bt/gmi/gmiService.class
              > WEB-INF/getList.xsl
              > WEB-INF/getListByConnection.xsl
              > WEB-INF/getListByDistrict.xsl
              > WEB-INF/getListByDistrictConnection.xsl
              > WEB-INF/lib/
              > WEB-INF/source/
              > WEB-INF/source/build.bat
              > WEB-INF/source/gmiService.java
              > WEB-INF/web.xml
              > WEB-INF/weblogic.xml
              > tmpwar/
              > tmpwar/jsp_servlet/
              > tmpwar/jsp_servlet/_gmiservice.class
              > tmpwar/jsp_servlet/_gmiservice.java
              >
              > When deployed on the production server with the web.xml file set to use
              the following values (note XML stripped):
              >
              > weblogic.jsp.pageCheckSeconds
              > -1
              >
              > weblogic.jsp.precompile
              > false
              >
              > weblogic.jsp.compileCommand
              > javac
              >
              > weblogic.jsp.verbose
              > true
              >
              > weblogic.jsp.packagePrefix
              > jsp_servlet
              >
              > weblogic.jsp.keepgenerated
              > false
              >
              >
              > And in the weblogic.properties file:
              >
              > weblogic.httpd.webApp.gmi=war/gmi
              >
              > I've also tried with the .war file, but that insists on creating another
              tmpwar directory outside of the .war file.
              >
              >
              > Then, although I have set pageCheckSeconds to -1 (don't check and don't
              recompile) ter production server still attempts to recompile the JSP's:
              >
              >
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              verbose initialized to: true
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              compileCommand initialized to: javac
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              superclass initialized to null
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              workingDir initialized to:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              pageCheckSeconds initialized to: -1
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
              initialization complete
              > Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
              file:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java
              > Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
              sun/tools/javac/Main
              >
              > java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[javac, -classpath,
              /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
              /opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
              ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
              ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
              logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
              5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
              /weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
              :/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
              /weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
              ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
              rver/weblogic/war/gmi/_tmp_war, -d,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java])
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              > at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              > at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              >
              >
              

  • How  we can use forms HTML capabilities with Oracle Applications?

    Hi
    Could not find any specific doc how we can use forms HTML capabilities with Oracle Applications?
    Thanks

    I'm not sure that I understand exactly what you are asking?
    What are you trying to do? If you could give a detailed explanation then we can try and assist.
    Reagrds,
    Bren

  • How do i use the jsp session in web application

    pls i do i go about trying to maintain a user in a web application when he sign in so that his state would be mainain through out the other pages and also adding sound to my pge the page is being design with jsp thank u frm hamzah

    I see what you are saying.
    The JNDI approach should work-we will try to reproduce this internally.
    I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
    Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
    There are a couple of options.
    If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
    You can also put the following in your spring application context file
    <osgi:reference id="myDataSource"
    interface="javax.sql.DataSource"/>
    This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
    http://www.springframework.org/osgi/specification
    (Look in section 3.3)
    Hope that helps.
    Seth
    Edited by swhite at 08/01/2007 6:19 PM

  • How I can use my domain name for APEX Application at Oracle Cloud?

    Hello,
    1. I have for example my-custom-domain.com and want that my customers use this domain to login at APEX Application at Oracle Cloud.
    I don't want that my customers see https://blablabla.db.us1.oraclecloudapps.com/apex/ and see instead of my-custom-domain.com :)
    How I can do it? Don't find any technical information about it...
    2. Can I use my ssl certificates for my domain for Oracle Cloud Instance?

    may be I don't understand you right...
    I have trial instance and test application here at https://database-trialajnn.db.us1.oraclecloudapps.com/apex/f?p=1500304
    database-trialajnn.db.us1.oraclecloudapps.com - it's 216.131.136.193 IP
    I write to my domain this IP = login.ds24.ru
    But when I test https://login.ds24.ru/apex/f?p=1500304
    It is not work and write that url is wrong for this ssl sertificate
    If I understand you correct now it's impossible use simple URL to login at application for example login.ds24.ru

  • How does J2EE SDK provide JNDI DataSource ?

    Still new to J2EE and working my way thorugh Wrox press "professional java server programming". Im using the deploy tool and im wondering how does J2EE provide JNDI names for a DataSource ? Im somewhat familiar with JNDI and I thought you had to use a directory service such as OpenLDAP to use JNDI.
    my questions then are:
    (1) What kinds of things can you do with JNDI without using a directory service ?
    (2) How does the J2EE SDK physically store references to a DataSource without using a directory service. In otherwords, how does the J2EE server provide for using JNDI names for a DataSource and is this a typical feature of J2EE containers ?

    i wish someone would answer this. i curious myself about these exact same things.

  • Problem using JDBC (JNDI) DataSource and data-sources.xml w/ OC4J

    I have a JClient application developed in JDev X. It works fine when using a JDBC URL for the connection (which then writes the connection into the BC4J.xcfg files, one for each application module). However, I would like the app to retrieve the data source from the server's data-sources.xml file. However, when, on the configurations tab of the application module I set the connection type to JDBC DataSource, and give it the JNDI name, it does not work, either with the embedded OC4J or the stand-alone OC4J. Any suggestions???
    In the stand alone OC4J I verified that the data source exists (using java -jar admin.jar ormi://nemethzoltan3 admin welcome -application adatklinika -testDataSource -location jdbc/adatklinikaCoreDS) ... so the data source is defined in the data-sources.xml. Of course the error I get is JBO-30003.
    If I just try to "test" the data source in Jdeveloper (using the context menu of the app module, and setting it to use the adatklinikaCoreDS) I get a JNDI error: unable to lookup data source and at level 3 a "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". I checked, the data source is defined under tools->embedded OC4J properties->data sources.
    If I try to run the main form, simply nothing happens.
    Please help!!!

    Ok, figured out why running from jdeveloper wasn't working: the embedded OC4J server wasn't started (start it by running an html page from your project or something...and make sure you don't have a stand-alone oc4j running). AND more importantly it didn't have the library "embedded oc4j client" library included (project properties -> profiles -> development -> libraries)...which is needed for whatever reason.
    Now to try and get it working with the stand-alone OC4J...

  • How to make use of javascript functionality in WD application?

    hi,
    I want to use some javascript functionality in my web dynpro application.
    This is my requirement:
    I want to design templates for User's ID card.
    For that , I need to use label, image area, headings in that template as drag and drop objects(so that we can move the lable, image fields whereas we want in that template area).
    We have already done this scenario by using javascript.
    How could it be possible in web dynpro?
    Can I use the existing javascript in my WD application?
    Anyone Pls suggest me.
    Thanks.

    hi Abdul,
    in addition you could read documentation on the popupmenu, you can find here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/de/416d42ab7fd142e10000000a1550b0/frameset.htm
    BTW: This only works for NW2004s (-;
    Kind regards
    Stefanie

  • How can I use two OID realms in an application in Jdev 10.1.2

    hello,
    We have an application in jdeveloper 10.1.2. We are using OID with jazn
    The users of the application are in two different realms. Right now, the application can se the users on the default realm of the OID to authenticate them, but cannot se the other realm (and the users of that realm).
    How can we do, to let the application be able to authenticate the users of the two realms.
    thanks

    Hi,
    The basics for using the two databases is simple.
    For database configuration you have to provide the driver class name, url, schema name and password during the creation of the connection pools. So u can create a as many no. of connection pools as the no. of the databases.
    Hope it will work..

  • How Could I use Java to program a SSL application?

    Hi, I am new Javar, I have a project. I need SSL and want to program with Java. Who could help me?
    Thanks!

    THanks! But I still do not know how to implement the interface.Such as HandshakeCompletedListener interface, how could I program a class to use it?
    Sorry for such simple question but I am very very new to java.

  • Using 2 relational datasources in one application

    Hi
    I was wondering if it is possible to use two PersistenceManagerFactories in
    one application server pointing to two different RDBMSs, such as one Oracle
    and one DB2 database, but using the same JDO Classes. In this case I would
    need to have two separate mappings, and I guess you would have to specify
    somehow which mapping file to generate from the mappingtool and which one to
    use in each PersistenceManager, but I have not found how to do it.
    Could someone please point me in the right direction?
    Cheers
    Sven Erik

    Sven-
    This is certainly possible, but we do not provide any built-in way to
    automatically use different metadata files on a per-database basis,
    except when using the "db" MappingFactory (which stored the mappings in
    the database; in your case, each database will store its own version of
    the mappings).
    Another option is to make your own implementation of the fairly simple
    MappingFactory interface to perform some differentiation of the
    metadata. E.g., you might have it look for "mymetadata-oracle.xml" and
    "mymetadata-db2.xml" depending on the database, and then pass-through
    the calls to the default MetadataMappingFactory.
    In article <bugg5g$mnk$[email protected]>, Sven Erik Knop wrote:
    Hi
    I was wondering if it is possible to use two PersistenceManagerFactories in
    one application server pointing to two different RDBMSs, such as one Oracle
    and one DB2 database, but using the same JDO Classes. In this case I would
    need to have two separate mappings, and I guess you would have to specify
    somehow which mapping file to generate from the mappingtool and which one to
    use in each PersistenceManager, but I have not found how to do it.
    Could someone please point me in the right direction?
    Cheers
    Sven Erik--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • How can one use one specific security realm per application ? The realm-name attribute of the login-config tag of web.xml does not make any difference

    Hi,
    I have different sets of users coming from different databases and using different
    roles mapping for each of my web applications. I would like to configure a specific
    security realm per application in my weblogic server 7.0 . Is it possible ?
    I try to specify the realm-name of the login-config tag from the web-xml deployement
    descriptor but it doesn't make any difference. The default realm is always used.
    I also would like to tell the Weblogic server to use the default realm in case
    the realm isn't specified or isn't found. For example, the default would contains
    my admin users.
    Thanks a lot for your answer.
    Iz

    I thik this is a common mistake the ralm-name tag in the deployment descriptor is used
    just by the browser for display purposes (when it opens the basic auth dialog box) so as
    of now there is only 1 active realm which can have multiple providers as Kevin pointed
    out
    Kevin Lewis wrote:
    WebLogic 7 now ignores the realm-name tag (I found that out yesterday).
    My understanding is that there is only one realm active at a time for a domain
    (I would be interested in being contradicted in this).
    However, you can have multiple providers in each category of a realm: authentication,
    authorization, etc. Therefore, what you can do is key authentication, et al,
    off of some other information. We have our users enter their company, for example,
    and use the TextInputCallback to get it. You could also encode something in the
    initial page, based on the URL they hit, or whatever, and get that back in your
    callback.
    You can store that information in your own Principal implementation, and key off
    of that in your authorization provider, going to a different database as appropriate,
    or abstaining when a specific provider doesn’t have anything to say about a subject.
    Anyway, there should be a way to do it, even if it's more complex than you would
    have hoped.
    --Kevin

  • How to use JNDI datasource instead of database connection settings JDev 10g

    Hi,
    In order to use the different database from other environments, we are not able to use the JNDI datasource configuration settings, all the time need to configure the database connection settings from JDeveloper by changing the database connectivity settings in the JDeveloper for each environment separately, need a solution on how to make the database connectivity unique using the JNDI datasource name for all the environments for database connectivity settings through the application server console rather than changing the database adapter configuration in JDeveloper.
    Please provide the update at the earliest. Your help is greatly appreciated. Thanks in advance..

    What are you not clear on?
    What you need to do is get your developers to conform to a database naming standard, as stated above, so if you have an oracle database that is for eBusiness Suite you get all developers to create a DB connection in JDev called, ora_esb as an example.
    When the developer creates a DB adapter this will create a JNDI name of eis/DB/ora_ebs. When the BPEL project is deployed it looks for the JNDI name in the oc4j-ra.xml file to see its connection details. If they don't exist then they use the developers connection details. The issue with this is that they generally always point to the development DB. It is best practice for the developers to remove the mcf settings in the DB adapter WSDL. This way if the JNDI name has not been configured it will fail.
    So when you migrate from dev-test-prod what you have is the JNDI name eis/DB/ora_ebs. The dev points to the dev instance of ebs, test points to the test instance and so on. This means that you don't need to adjust any code in the BPEL projects.
    cheers
    James

  • BC4J and J2EE Patterns (JNDI Datasource)

    Hallo Everybody,
    My Application reads from connections.xml the jdbc connection settings,
    in order to connect to the oracle database.
    I don't like the fact that I have to force my Customer to edit this File by Hand for the JDBC Settings.
    I would like to use a "JNDI Datasource Name" for example jdbc/MyDatabase that will evaluated
    from the Applicationserver (not from bc4j interal JNDI!!!!)
    In this case, the Customer can define the jdbc Connection Settings in his Applicationserver
    by creating a "Resource-Reference" for a javax.sqlDataSource with the name "jdbc/MyDatabase" .
    ( This is also Possible in Tomcat. )
    This is the usual way to configure jdbc Connections in a managed Enviroment.
    How can I say to the Applicaton Module "please obtain your jdbc-connections over the datasource java/MyDataBase" ???
    Is this in bc4j Framework possible ? ( note: I'm new to bc4j but not to j2ee )
    Thank for any Hint,
    regarts,
    Manolis
    (sorry for my bad english, learned it through compiler error messages ;-) )

    See
    Re: What software do I need to get started with GIS development

  • JNLP and Tomcat JNDI DataSource

    Software
    JDK 1.5 Update 6
    Tomcat 5.5.4
    Requirements
    I have a Client Side requirement and this project is going to be deployed to 5 users initially all in a lan but there are very chances of adding more users simultaneously.
    I am thinking of deploying in JNLP Environment.
    At present the Swing application though in development phase is running a little slow and therefore I required the way by which I could store the references of the Object in some server.Getting Connection Object is also a major time consumer and so I needed some way by which I can use the Tomcat DataSource and use the JNDI facility to store certain intermediate values in the server.
    Can I use the JNDI in the JNLP Application.
    Please provide me the way by which I can do this stuff
    Thanks in advance
    CSJakharia

    .> I am using tomcat 5.5.9 and oracle 9i. I am hosting a
    portal which uses connection pooling.
    I have decided to use the connection pooling through
    tomcat's JNDI naming lookup.Excellent idea.
    for this i have used the following steps --
    1) made entry of <resource-ref> in webapp's web.xml
    2) made relevant and corresponding entry in tomcat's
    ${TOMCAT_HOME}/conf/context.xml (for JNDI
    JDBC-datasource)No, don't do it that way.
    .> my problems are--
    1) making the entry for context.xml in tomcats
    conf folder makes the application war dependent
    on web server which i dont want to make.Yes, it does.
    2) i have to put classes12.jar in tomcats
    ${TOMCAT_HOME}/common/lib folder and only then the
    application connection pooling works else the
    exception coming on tomcat console is --
    org.apache.tomcat.dbcp.dbcp.SQLNestedException.
    Why aren't you using the latest JDBC driver from Oracle? That's in ojdbc14.jar.
    .> I dont want to put classes12.jar in web server i want
    the web server's JNDI lookup to pick the driver frm
    my webapps' internal lib folder. please help me on
    these very pressing and immediate issues. all the
    help coming from anyone in this regard is very much
    welcome.
    thanks in advance!
    VaivYour instinct is correct.
    (1) Put ojdbc14.jar in WEB-INF/lib of your WAR file.
    (2) Edit the <Context> XML into a file named context.xml and put it in META-INF of your WAR. Tomcat should pick up the context information for the JNDI data source from that.
    Everything is in the WAR, and you don't have any dependence on the server that way.
    %

Maybe you are looking for

  • Contact and Calendar Duplications, sync and more issues!

    I have the iPhone 4S. I decided to activate the iCloud on my phone through to iCloud and to my Windows PC laptop.  However, this caused all my calendar entries to duplicate and I had to manually delete the duplications on my Outlook Calendar so that

  • Certain sites not working

    Hello, got this problem for a few days now, so coming here to ask around =) I bought a 13" Macbook Pro in March, it's been doing good for these 2 months. My old network kind of broke and I changed the router and now I have a new network. However, Saf

  • How do I take pictures that were texted to me and add them to my Gallery?

    I love my Nexus!

  • Can I make a website with just using Photoshop and Flash together?

    I am new to web design and am working on a website. I have not purchased dreamweaver, but am familiar with it from school. I do have Adobe Flash and Photoshop extended. Can I just use the two programs Adobe Flash, and Photoshop extended to complete a

  • N80 Bluetooth GPS Problems ???

    Navicore have a Symbian series 3 version of their navigation software available unfotunately they do NOT support the N80, their official reply to me : 'It has been unfortunately identified that there are some problems in the Bluetooth connection betw