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.

Similar Messages

  • CS6 - Does CS6 SDK provide a dialog box whose icon can be adjusted?

    I am porting a CS5 plug in to CS6.
    My plugin contains 1 main form and some alert dialogs which are independent to the main
    (e.g. a "Help" dialog box shows when users click at AI > Help > [My Plug-in Help] button).
    The main form which uses Flash UI is done.
    But the "Help" dialog has a problem.
    I want to use CS6 SDK to show a dialog with my specified icon, not the warning icon as default.
    # I tried the alerts in AIUserSuite but none of them is appropriated.
    Does CS6 SDK provide a dialog box whose icon can be adjusted?

    Thank you LeoTaro.
    But my implementation made AI crashed after PlugPlugLoadExtension is called.
    Please tell me the wrong points of my practice. Thank you!
    LeoTaro wrote:
    1. Create an mxml file for the About dialog in the same way as you did for your main panel.
    MainScreen.mxml
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    width="865" height="545"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off"
                    layout="absolute"
                    creationComplete="init()" >
    --> Create new HelpScreen.mxml
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    width="865" height="545"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off"
                    layout="absolute"
                    creationComplete="init()" >
    2. In your manifest.xml file add an Extension entry for the dialog in the ExtensionList and in the DispatchInfoList.
    3. In the Extension entry in the DispatchInfoList set AutoVisible to false
    I cannot edit manifest.xml by Flash Builder (it just does not allow me to type there)
    so I used Notepad++ to add HelpScreen extension as you mentioned.
    and don't include a Menu setting.
    I don't how to do this so I skipped it for temporary.
    Then, I rebuilt the project by Flash Builder.
    4. You can then use the PlugPlugLoadExtension and PlugPlugUnloadExtension functions in the PlugPlug shared library to show and hide the dialog from your plugin.
    Finally, since some conducted steps are incorrect, the AI is crashed after PlugPlugLoadExtension is called.

  • HT2736 How does a content provider obtain a redemption code to provide to others for free downloads of their own content

    How does a content provider obtain a redemption code to provide to others for a free iTunes download of their own content. This would be similar to what Starbucks does. However, it would the actual content provider and not a third party.

    Same issue. We produce a number of Podcasts and are about to launch a national print campaign to promote them under a single brand identity.
    I tried that method already as well, but got the response back that I needed to contact a different department using the "report this podcast" link associated with the Podcast in iTunes (which, of course, doesn't have any options for anything close to this type of request.) Been 48 hours and no response yet. Anyone had any success with this?

  • Does client container provides JNDI services?

    I'm confused in a client side JNDI lookup question. A requirement to me is to obtian ConnectionFactory from JNDI and connect to a EIS via client-side Resource Adapter, but on my client side, the JNDI string is java:comp/env/eis/local/ABC. I'm wondering does client container provides JNDI services? I'm a newbie on this, so any help will be apreciated. Thanks!
    [email protected]

    I am just pasting some contents regarding this. This may solve ur doubt
    Obtaining the InitialContext Using the Client's Environment
    The properties can be initialized in the client's environment, thus avoiding the need to hardcode the values for these properties inside the client's code. To do this, the following environment variables must be set. If any of the properties isn't set, its default value (if any) is assumed:
    java.naming.factory.initial? Provides the value for Context.INITIAL_CONTEXT_FACTORY
    java.naming.provider.url? Provides the value for Context.PROVIDER_URL
    java.naming.security.principal? Provides the value for Context.SECURITY_PRINCIPAL
    java.naming.security.credentials? Provides the value for Context.SECURITY_CREDENTIALS
    These properties may be set in the Java runtime's system properties, or in cases of an applet, in the applet's parameter list.
    Another way of setting these properties in the JNDI environment is by the use of resource files. A resource file is a flat file containing key-value pairs that define the JNDI's environment. The keys are the different properties that have been discussed in this section. This file should be named jndi.properties and should be available in the application's class path. In addition to this, JNDI also looks for the jndi.properties file under the lib/ subdirectory under java.home. All the readable resource files are loaded into the application's environment. In most cases, if the same property is defined in different resources, the first value found is used. In a few other cases, where it makes sense, the values found in the different resource files are concatenated.
    After these properties have been set, you can initialize the InitialContext simply by invoking its default constructor:
    Context ctx = new InitialContext() ;
    You can find this example in ch08/com/wlsunleashed/jndi/Example2.java. This example obtains the InitialContext object from the WebLogic Server and tries to looks up javax.transaction.UserTransaction. To execute this example, start the WebLogic Server instance in your local host, listen in port 7001, and execute the corresponding class. Pass in the different fields discussed in this section as command-line parameters. For example, you can execute the class file using the following command line:
    C:> java -Djava.naming.factory.initial=
    weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=t3://localhost:7001
    com.wlsunleashed.jndi.Example2
    Experiment with this example a little more by creating a jndi.properties file and putting it in your classpath. Now execute this class without the command-line arguments. You'll get the same results. Perform the test again, but this time provide the command-line arguments along with the jndi.properties file. Make the port number in the command line incorrect. You'll notice that the value provided in the command line is used, and the class file errors out. It's quite easy to notice that the command line gets precedence over the jndi.properties file.

  • 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

  • How does the SDK and Reader handle printing with orientation?

    I have a document that I want to print, and it contains a portrait page on Page 1, and a landscape page on Page 2.  Acrobat Reader correctly prints these pages (with a single print job), and I'm assuming it's because of the auto-rotate option on the print dialog.  Is this a feature of Reader, the API, or how the printer handles the request.  I've tried printing this PDF just using the JAva API, but the orientation remain portrait for all pages.  How does the Adobe Acrobat API deal with mixed orientation pages?  Ignore the fact that I did my test printing with Java, because my question is whether or not the auto orientation is a feature of the UI, the SDK, or the printer (or a combination).

    Same as the current Ipod Video or "Classic" there is an option under settings to toggle between original aspect ratio or Full Screen.
    Kenal0

  • How does the iPad provide Random Access Memory?

    Is all the RAM on the chip?  Does it use free space as scratch?  The specs only speak about the CPU for computing power.
    My wife's medical practice is using iPads for Electronic Health Records, and this is a new system transitioning from paper.  It is a cloud based software called Athena, and I suspect that their problems stem from inadequate memory (RAM or possibly even vRAM). They experience freezes and being "kicked out" of forms while entering information which requires them to reenter the information. This is a big drag on time for her staff.
    These problems are less frequent when they use their Windows based laptops, and performance is even better when they use their desktop work stations. I don't know the specs on these computers. However, she experiences no problems when using her Macbook Pro which is a 2007 2.6 core2duo with 4GB of RAM. This is what leads me to the conclusion that it's a memory issue.
    I don't know for sure because I'm getting my info second hand, but I think the iPads have the A7 chip.
    Thanks for any insight you may have on how this works.
    DLS

    Here's the spec sheet on the iPad Air. It has 1GB RAM.
    http://www.everymac.com/systems/apple/ipad/specs/apple-ipad-air-1st-gen-a1474-wi -fi-only-specs.html
    The comparison with a laptop or desktop with 4GB ram is not a fair comparison. All open apps use some of the available RAM. So close the iPad apps that are not being used.
    iPad running slow? How to speed up a slow iPad
    http://appletoolbox.com/2012/07/ipad-running-slow-how-to-speed-up-a-slow-ipad/
    If You Think iOS 7 Feels Slow Here’s How to Speed It Up
    http://osxdaily.com/2013/09/23/ios-7-slow-speed-it-up/
    You may have many apps open which can possibly cause the slowdown and possibly the loss of wifi. For iOS 7 users, there’s an easy way to see which apps are open in order to close them. By double-tapping the home button on your iPhone or iPad, the new multitasking feature in iOS 7 shows full page previews of all your open apps. Simply scroll horizontally to see all your apps, and close the apps with a simple flick towards the top of the screen.
     Cheers, Tom

  • How does a publisher provide updates for  books to use the ibooks 3 update feature?

    Are updates provided only by publishing through the iBookstore, or will iBooks 3 pick  up changes from books purchased elsewhere?

    Have you tried updating them through iTunes on your computer, or, updating the books in iBooks on your computer (if using Mavericks).

  • 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

  • How can I configure ang use JNDI datasource on Tomcat 4.0.x ?

    How can I configure ang use JNDI datasource on Tomcat 4.0.x ?
    Please help me , Thanks !

    Hello ,
    You need to go through the JNDI tutorial which you can access at the sun's site. It will explain all the things you need.
    By the way all you want to use JNDI datasource is JNDI class library and some naming or directory service provider, which also you can download from sun.
    Good Luck.

  • 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

  • How to use jndi datasource on Weblogic instead of adding a DB data source

    Hi All,
    version: 11.1.1.4
    I am trying to figure out how in my ADF applications I can use an existing jndi datasource out on our weblogic servers instead of having to bury the Database db source in my adf applications. Like SOA I would like to reference the DB directly during design so I can pull in entities and build view objects, but when I deploy I want it to reference the jndi datasource out on the weblogic server.
    Is this possible? If so I am not sure how to configure it like I would a DB adapter in SOA.
    As always appreciate the info.
    Thanks,
    S

    If you use ADF in the model layer (application modules) you can configure them to use JNDI Datasources. Just right click on the application module and select 'Configurations...'. In the next dialog you see all the configurations currently available (one named xxxxxlocal and one named xxxxxshared at least). Select the local and hit the edit button. This open the DB connect dialog where you can change the connection from JDBC URL to JDBC Datasource (JNDI). Save your work and when you now start the app it will use the JNDI name.
    Timo

  • I would like to know which app/software in MAC gives us the same feature that is provided by System Restore in Windows, and how does that work

    I would like to know which app/software in MAC gives us the same feature that is provided by System Restore in Windows, and how does that work.

    Time Machine is one such program, although it is a recursive backup program which offers limited archive capability, based on the capacity of the backup destination, and it requires you set it up before you start editing your files.   Some programs are also Versions aware, which offers a kind of restore capability by file.  Again needs to be setup before you start editing.
    Just a for-your-info:
    Mac is not an acronym, it is a nickname for Macintosh.

  • How coud i do to deploy a app to the website that shiped by j2ee sdk

    i want deploy a app to the website that shiped by j2ee sdk.
    i found the "conf" folder under the J2EE_HOME.but the website is have nothing with the file "server.xml" in this folder.
    how could i do?
    thx

    The J2EE 1.4 Tutorial describes how to deploy applications:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

  • How does one add tables to an existing universe using COM designer SDK.

    Morning All
    How does one add tables to an existing universe using COM designer SDK. I have tried:
    objUniverse.Tables.Add (strTable_Name)
    but get "Cannot create Table" error.
    Any ideas?
    Thanks in advance.
    Anita

    Hi Anita,
    -Use the Add method to add classes and objects to an existing universe using a VB 6 application.
    Adding a Class
    Definition: Function Add(Name As String) As Class
    Syntax: NameOfClassesVariable.Add
    Adding an Object Instance
    Definition:  Function Add(Name As String, [ClassName As String]) As Object
    Syntax: NameOfObjectsVariable.Add(name, [class])
    - name is the name of the object.
    - class is the name of the class containing the object. This parameter should be used in cases where more than one objects exist with the same name.
    Sample Visual Basic 6 Code
    Dim DesApp As Designer.Application
    'MODIFY AND EXPORT CLASSES AND OBJECTS OF AN EXISTING UNIVERSE
    Sub modify_and_export_universe()
    Dim DesUnv As Designer.Universe
    Dim DesCls As Designer.Class
    Dim DesObj As Designer.Object
    Dim DesDBCol As Designer.DBColumn
    Dim DBColName As String
    Set DesApp = New Designer.Application
    'Login to designer
    Call DesApp.LogonDialog
    'Make sure to log on with your administrator profile
    'e.g : "hostname","username", "password","Enterprise"
    'Make Designer application visible
    DesApp.Visible = True
    'This line disable warning messages from Designer
    DesApp.Interactive = False
    'to Open  locally  the universe you want to modify
    'Set DesUnv = DesApp.Universes.Open("club_uni")
    'Use OpenFromEnterprise method (Universes Class) to import a universe from the repository and opens it
    Set DesUnv = DesApp.Universes.OpenFromEnterprise("Universes", "club_uni", False)
    'Add a valid connection which already exists
    DesUnv.Connection = "club"
    'open the universe
    'Call DesApp.Universes.Open("club_universe")
    'Add the table Account and refresh the view in the main window
    Set DesTab = DesUnv.DBTables.Item("Customer").Insert
    DesUnv.ArrangeTables
    'Add a class
    Set DesCls = DesUnv.Classes.Add("Class MyCustomer")
    'Looping through all the fields of the DB Table Account
    For Each DesDBCol In DesUnv.DBTables.Item("Customer").DBColumns
    'Store name of the column
        DBColName = DesDBCol.Name 
         'Add an object to the class
        Set DesObj = DesCls.Objects.Add("Obj " & DBColName)
         'Affect a field to the object
        DesObj.Select = "Customer" & "." & DBColName
    Next
    'Save the existing universe with the same name club_uni or you can change
    DesUnv.SaveAs "club_uni"
    MsgBox "Universe created and saved Class MyCustomer has been added!!"
    'Close the universe
    UnvFullName = DesUnv.FullName
    MsgBox "The UniverseFilePath is " & UnvFullName
    'Close the universe
    DesUnv.Close
    'This line disable warning messages from Designer
    DesApp.Interactive = False
    'Export the universe to the CMS DB (to the last universe folder)
    'Make sure you save the universe before exporting it
    Call DesApp.Universes.Export("Universes", UnvFullName)
    MsgBox "This document has been exported successfully !!"
    'Close designer
    DesApp.Quit
    Set DesApp = Nothing
    End Sub
    Hope this helps.
    Regards,
    Deepti Bajpai

Maybe you are looking for

  • T61 7662 fails to boot

    One long beep followed by 2 short beeps. T61 7662 with NVIDIA QUADRO140M graphics card and original 1 GB memory Downgraded from Vista Business to XP My T61 7662 had its fan die a year or so ago. I was advised on this forum to press escape to boot up

  • New computer, downloaded a program and it now will not uninstall program

    I recently just bought this laptop and I downloaded Windows Office 365 proplus, (basically it says office 2013 version in all of the programs,)  package from my schools website for me to do school work.  I ran into an issue first with being able to l

  • How do I remove a playlist from my iPod in iTunes

    I have my iPod Nano configured in iTunes and I have about 10 playlists that automatically sync when I connect the iPod.  I'm running out of space so I want to delete a few playlist from those that sync to the iPod.  I used drag and drop to put them o

  • Changing Page Display Preferences

    Is there a way to change the page display preferences for all PDFs using the registry or something that can be scripted on install. I want to hide the navigation panel buttons on the left and untick the "Create Links from Urls" checkbox.. Any help is

  • Convert WMV to a video format for iPod?

    Hello, I have a WMV recording of a Microsoft Live Meeting event. It is 1.5 hours in length, about 31MB and 4 fps. I need to convert it to a video format that can be played on a video iPod. When I try to export as MP4 from Premiere Pro CS4, the file s