How can i lookup a data source v5 in WSAD 5.1?

Hi all,
I'm using WSAD 5.1 to developer a web application based on J2EE 1.3 that have a simple java classes. My application uses a data source version 5 to have access the database. I?m using service locator pattern to lookup a JNDI but it dont work properly on stand alone java classes, only on EJB components.
How can i lookup a data source version 5 from my java class on WSAD 5.1?
Can anyone help?
Thanks,

Oh I did not realize that you were talking about a stand-alone application. You cannot use the server datasources in your stand-alone application.
You can use the Oracle helper classes to construct a DataSource on the client side.
http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html and driver specific documentation to achieve this. I will try to send a few links, if I find any.
In a stand-alone application, you can use some connection pooling mechanism on your own.
The ideal thing to do is to keep your data access in your middle tier (EJBs) and call the EJB's. This way you can reuse things in multiple client tiers and use the container provided datasource and connection pooling mechanisms.
Hope this helps.
Vijay

Similar Messages

  • How can we create a data source on structures

    Hi,
       How can we create a data source on structures.
    Regs,
    abdul

    Abdul,
        Welcome to SDN!
        We can't create Datasource using Strcutres. We need to have base tables.
        For Function Module Extractors, we will create strctures. We will use these strctures as Extract Structures. But, we will get the data from Base tables only not from Strcutures.
    Strctures won't contain data.
    all the best.
    Regards,
    Nagesh Ganisetti.

  • How can I manage my data sources better?

    I'm learning WebLogic and my installation already has a data source configured to point to one of our eight databases. As we move through different phases of development, I need to point to a different database and changing it in WL is cumbersome. What I would like is to have all eight databases added as eight sources and enable only one at a time depending on our needs. I'd like to know:
    1) How does WebLogic know which data source to use for my .ear?
    2) With more than one data source, how do I ensure that only the one I want is used by my ear?
    Many thanks,
    TenLeftFingers

    It depends a bit on what you want to do (what you mean by "manage"), but perhaps this will help:
    Settings app > iCloud >
    http://help.apple.com/ipad/7/#/iPad995bbafe

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • How can we acess the data of one component into othr component in webdynpo?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1)  which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the  component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi,
    Please post your query in forum Web Dynpro ABAP Forum, under Application server.
    You have to define the source component as in the used component in the target one to do that.
    after that you will be able to get data from that component.
    Regards,
    Vaibhav

  • How can I delete old data in citadel

    How can I delete old data from Citadel so that HDD is not full when data is continously being logged in the database ?

    Hi there,
    I could see different possible ways to limit the database size on a LabVIEW DSC system.
    a) You could limit the lifespan of your logged data to a certain time by adjusting the option 'Days to keep historical data' in the Tag Configuration Editor>Configure>Historical... tab.
    b) You could use the Citadel Database VIs. Archive Database.vi would allow you to archive a database or a part (certain traces/tags, or certain time interval) to another location. With the archive option 'destructive', it would delete the source of the data from the original database.
    Delete Traces.vi would delete a traces from a database.
    c) The same/similar functionality you can have throught the Measurement and Automation Explorer and its Historical Data Viewer plug-in
    b) and c) are NEW features of LabVIEW DSC 6.1!
    Hope this helps
    Roland
    PS: There is a nice link about archiving Citadel on ni.com :
    http://zone.ni.com/devzone/conceptd.nsf/webmain/2F24997EAD7C53A686256B6E00686D64?opendocument&node=DZ52101_US

  • Oracle Forms - How can I create a Data Block with query

    Dear friends I have a question, I couldn't do this..
    I have a sql query, I want to show the datas of the query.. How can I do this. ?
    Data Block Wizard wants a table, view or stored procedure, but I have a query, how can I create a data block with my query.. I m waiting your helps..? Please...
    Semih

    Hi,
    You have two options
    1. create a view and base the block on the view
    2. create a block with a query Data Source Type of 'FROM clause query'
    Hope this helps
    Neil

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Lost all of my data on iphone and have no cloud back up how can i get my data back

    lost all of my data on iphone and have no cloud back up how can i get my data back

    iOS devices do backup automatically to iCloud providing:
    iCloud Backup is turned on
    It has a Wi-Fi connection
    It is connected to a power source
    The screen is off
    5GB is plenty of storage for me to backup to iCloud automatically.
    I have a 64GB iPhone & a 128GB iPad both backing up to the same iCloud account and I still have nearly 2GB free.
    This is mainly because media is not backed up and Photo Stream & iTunes purchases do not count against your iCloud storage.
    Here’s what iCloud backs up:
    Purchase history for music, movies, TV shows, apps, and booksYour iCloud backup includes information about the content you have purchased, but not the purchased content itself. When you restore from an iCloud backup, your purchased content is automatically downloaded from the iTunes Store, App Store, or iBooks Store. Some types of content aren’t downloaded automatically in all countries, and previous purchases may be unavailable if they have been refunded or are no longer available in the store. For more information, see the Apple Support article iTunes in the Cloud availability by country. Some types of content aren’t available in all countries. For more information, see the Apple Support article Which types of items can I buy in my country?.
    Photos and videos in your Camera Roll
    Device settings
    App data
    Home screen and app organization
    iMessage, text (SMS), and MMS messages
    Ringtones
    Visual Voicemail

  • How to connect to different data sources in  XI 3.1 UNIVERSE?

    hi experts,
    We are going to migrate from BO 6.5 to  BO XI3.1.
    and we have different data sources to extract and generate the reports using various tools like Webi,Crystal Reports, Deski etc.
    1         How to connect to different data sources like SAP BI query, DB2, Oracle etc,, provide me the step by step solution.
    2     We need to migrate the universes and reports from BO 6.5 to BO XI 3.1 using the Report Conversion Tool.
    can we directly convert from the deski reports to Webi or do we need to migrate first through Import Wizard?
    3    Scheduling the Reports through Infoview
    4    Various issues and how to resolve those issues, we generally face while scheduling, and while creating the queries like for example time out errors etc..
    5    BO Security
    6    Universe creation with best practices and the loops,contexts,aliases etc..
    please provide me the step by step solution documents and links.
    thans in advance
    venuscm

    I would recommend to take a look at the official documentation. YOu can find this here
    http://help.sap.com
    NAvugate to SAP BusinessObjects->All products and the select the product you want eg. BusinessObjects ENterprise or Universe designer and the appropriate version XI 3.1. Take a look at the admin and the user guides.
    Currently the Data FEderator will allow you to buid a universe that access data from various data sources. Another option is to merge queries from different universes at report level.
    Regards,
    Stratos

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • How can I copy the date and time in Mail header?

    How can I copy the date and time in Mail header?
    I can copy everything else in the header for pasting in another application. 
    But not the date and time which is absolutely vital.
    It was ok in 10.6 

    I suppose you could copy it from the Raw Source. View>Message>Raw Source

  • How can I get the date and time and display it on the report main page?

    Gurus,
    How can I get the date and time and display it on the report main page?
    Thanks!

    Hello,
    You can create a Formula Colum returning a date :
    function CF_1Formula return Date is
    begin
    RETURN(SYSDATE);
    end;
    Put a Field in the Layout having this formula column as source .
    Regards

  • How to identify whether any data source is created for a table?

    hi all,
    How to identify whether any extractions is been carried out for a particular table, view or function module(generic extraction)? from r/3.
    bcos i need to create an extraction for a table, view and function module. But  iam not sure whether any extractions is already been created for those tables, view, function modules??
    thanxs
    haritha

    Hi,
    By passing the following values as selection to table  ROOSOURCE we can find whether any data source has been created or not .
    EXMETHOD = V
    EXTRACTOR = Table name
    hope it helps..
    regards,
    raju

  • How to create 3.x data source in bi 7

    Hi Guys,
                 can anyone tell me<b> how to create 3.x data source(emulated) in bi 7.0 </b>
    pls reply  me this is urgent
    ravi

    Ravi,
    Please do not multiply the same question several times. The answer is given in the other replica:
    how to create 3.x filesystem data source(emulated) in bi 7.0

Maybe you are looking for

  • How to do billing for Free of  charge delivery item

    Hello Gurus , We have some requirement: The requirement  is this  company is  delivering the goods to customer in free of charge, but want to do Billing is it possible. But as per my knowledge it is not there in standard  , I checked in system . look

  • Bank Key giving error for ECC to CRM replication

    While replicating BPs from ECC to CRM, the following error shows in the BDoc: "Bank XXXX-YYY for Country ZZ does not exist" To the best of our understanding, the Bank (branch: XXXX-YYY) detail is not available in the CRM, but where to make in CRM or

  • I want to pay apple for a battery replacement HOW?????

    Hello. My iphone 4S battery is useless.  It doesn't hold charge and falls from 50% to "off" instantly. I want to pay apple the £55 + shipping to get the battery replaced However doing this appears to be impossible. Apple say I cannot speak to them. O

  • Iweb and domain

    i just published my photos thru iweb on my .mac account and i also bought a domain name so people can go to this address and see my pics. i only bought the domain name since .mac is hosting the web. what do i need to do to get the 2 in sync? i am not

  • Unable to view the events saved on my iPhone on my MacBook's calendar/iCloud

    Unable to view the events saved on my iPhone on my MacBook's calendar/iCloud   When looking through my calendar via my MacBook/iCloud, I am only seeing people's birthdays from my contacts and not seeing any events saved from my iPhone4s. Is there any