Use of FakeDataSource.properties file.

Hi,
Could you please tell me the usage of FakeDataSource file in JTDataSource file. Why we need this FakeDataSource file.
Your response will be needful for me.
Regards,
Srinivas

Hi,
FakeXADataSource is an implementation that wraps an old JDBC 1.0 style driver and knows how to make a single connection using that driver's settings. In other words, each time you call getConnection(), a brand new connection is created.
FakeXADataSource is our wrapper around non XADataSource implementations that allows you to use them within the JDBC 2.0 environment. It's the responsibility of the JDBC driver vendor to provide XADataSource implementations. If you have a valid JDBC 2.0 driver with an XADataSource class, you should instead use that class for this component. However, if the driver doesn't have an XADataSource, you can use the FakeXADataSource to wrap it.
Thanks & Regards
Suman Vasireddy
Please mark any update as "Correct Answer" or "Helpful Answer" if that update helps/answers your question, so that others can identify the Correct/helpful update between many updates.

Similar Messages

  • Using jrun and properties files

    For some reason my while deploying, the jsp cannot find the .properties file. I've tried putting it in almost every single directory on the server. Can anyone help???
    Thanks

    The .properties files must be in the classpath that JRun is using. There should be a <something>\classes directory in your CLASSPATH that JRun's using, try putting it in there.
    Take Care,
    Rob
    null

  • Inverse use of multilanguage properties file.

    Hello,
    thanks for reading this!
    I`m using <f:loadBundle basename="com.company.web.Texts" var="txt"/> in my xhtml file for accessing my multilanguage files.
    When i`m inside a dataTable iteration, i want to translate values. I can access the value via:
    <h:outputText value="#{iteration.value}" />
    i would like to do something like this:
    <h:outputText value="#{txt.#{iteration.value}} />
    but this is not possible in jsf with this syntax.
    Is there any way to do this?
    Thanks for your help!

    Use the brace notation in EL the usual way.
    #{txt[iteration.value]}

  • How to use .properties files in Webdynpro Java code?

    Hi all,
      I want to use a logon.properties file when I initial a JCO connection pool in my webdynpro DC (JCO.addClientPool()),but  I found when I deployed this DC to the server, it always giv e me an FileNotFoundException. So I donot know how to deploy a .properties file to the server and how to access this file in my Java code?
    Thans and Best regards
    Deyang

    Hi,
    1) put .properties file to your packege under src\packages folder (src\packages\com\sdn\properties\jco.properties)
    2) load property:
         final InputStream is = getClass().getClassLoader().getResourceAsStream("com/sdn/properties/jco.properties");
         final Properties properties = new Properties();
         try
              properties.load(is);
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    Regatds Maxim R.

  • Use properties file in Struts framework

    I develop a websit with struts, web ap is tomcat5.0, and I have a conf.properties file
    this file is different from ApplicationResource.properties, conf.properties in the /MySite/conf/ directory, not in src directory
    When I Use the conf.properties file in a Common Java Class that not extends any super class
    it will occur a FileNotFoundException exception
    How to make it
    public class Environment
         private static Properties prop = new Properties();
         private static FileInputStream in = null;
         public static String getVariable(String key)
              try
                   in = new FileInputStream(new File("\\conf\\config.properties"));
                   prop.load(in);
                   return prop.getProperty(key, null);
              catch (Exception e)
                   e.printStackTrace();
                   return null;
              finally
                   try
                        in.close();     
                   catch(Exception e)
                        e.printStackTrace();
         }

    Your class cannot find the file in the location tht u have given. The path (\\conf\\config.properties) is relative to the location where your source (Environment class) is kept.
    Try to hard code the path & see if your source can find the prop file ...

  • Use resourceBundle properties file from KM

    Hi,
    I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
    Now I'm developing a new LinkCommand service for the UserDetails.
    http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
    The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
    For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
    Can anybody help me?
    With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
    Regards,
    Stefan

    Hi Praven,
    Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
    I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
    I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
    I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new.

  • How to give Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    You can use ResourceBundle class to load this properties file from the classpath:
    ResourceBundle props = null;
    props = ResourceBundle.getBundle("com.company.sql.SQL");

  • How to handle multiply properties.files in combined applications

    I have some applications bundled into one jar for each application. The applications make all use of a properties.file in it's own /resources/ folder within the jarfile.
    To avoid running each application on the desktop with it's own JVM and as seperate programs, I wrote a menuprogram which can start the applications within a splitted pane. Left pand is a JTree menu, right side is the applicationspace. This way i have only one JVM active and all app's can be accessed from within a single window. This menu applications also has it's own properties.file.
    I noticed that the applications now all use the same properties.file which is actually not correct. The file used is the one which belongs to the menu application.
    So i have : menu.jar, app1.jar, app2.jar, appn.jar
    The menu.jar is started and from within this application i run the other applications (jInternalFrames). All apps seems to see only the properties.file within the menu.jar IMHO because i create the objects from app1, app2 and appn from within the menu.
    QUESTION:
    How can i change the code to force each app.object to use the propsfile delivered in his own jar-file?
    Here's a code snippet used in each application.
    setPropertiesFileName("/resources/application.properties");
    try {
    is_ = getClass().getResourceAsStream(propertiesFileName);
    props.load(is_);
    catch(Exception e){
    // Debug Props
    setDEBUG_LEVEL(props.getProperty("DEBUG_LEVEL"));
    setTRACE_ENABLED(props.getProperty("TRACE_ENABLED"));
    ...

    You can do this, but is it generally a bad idea which can turn into a nightmare to manage.
    Instead each application should use a different properties file. Is there a good reason every application proeprties must have the same name and path?

  • Report server name in rwservlet.properties file

    Hi all,
    I dont want to hard code the report server name while calling report from the form...
    I have used....
         vrep := RUN_REPORT_OBJECT(myreport1);
    /* Checking for Report Server is started or not, if not throw an exception else proceed */
         if vrep = vrep||'_0'then
         raise form_trigger_failure;
    end if;
         vjob_id := substr(vrep,length(vc_reportserver)+2,length(vrep));
         vrep_status := REPORT_OBJECT_STATUS(vrep);
    where vc_reportserver is assigned a value of my report server name...
    If I edit rwservlet.properties file and give
    server=<my rep server name>,
    How can i read this value from the form ? Any help please?
    I know there is a way to do in formsweb and default.env. But I want to know the way how to used in rwservlet.properties file and use it in the form.
    Kindly help
    Priya

    Thanks Francois for your reply.
    You can pass this value in the formsweb.cfg file (otherparams=)So, in forms I have to create a parameter matching with the one what I have mentioned in otherparams. right?
    you can read it from a database parameter's table (solution I prefer).So, just storing the report server name in database and fetch like
    select --- from tablename! Is it so?
    And apart from this, may I know why you prefer this method?
    And why not rwservlet.properties??
    Regards
    Priya

  • Locating a properties file

    Hey,
    My application makes use of a properties file which it needs for some connection settings. Currently the properties file is in the same directory as the .jar (.exe) so everything works fine. but i at some point id want the .exe to be on the desktop but the file located elsewhere. so i thought .. y not use JFileChooser, and i did, and everything worked fine. noww.. the problem is ... i only want the open file dialog to show when it cant find the file. so .. when the filechooser is used.. i need a way to save the path (i can get the path using file.getPath() ) but how/where do i save this path? ( cant save it in the properties file lol). whats the proper way to handle this? Thanks,
    bpfl

    Do you hava example on how i can use this?
    i did find this...
    package com.acme.widget;
    import  java.util.prefs.*;
    public class Gadget {
        // Preference keys for this package
        private static final String NUM_ROWS = "num_rows";
        private static final String NUM_COLS = "num_cols";
        void foo() {
            Preferences prefs = Preferences.userNodeForPackage(this);
            int numRows = prefs.getInt(NUM_ROWS, 40);
            int numCols = prefs.getInt(NUM_COLS, 80);
    }so thas setting the number of rows and number of columns .. right? this is how i set the preferences for a particular user. i want to be able to set them one time and then everything the program is launched, it should use those preferences set the very fist time the program runs, i do have connection settings page in which the user can change the settings. How do i get preferences?

  • How to set Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    I am using the propeties file to get the SQL statements. I have all the SQL query statement in the properties file. I am creating a preparedstatement after getting the statement from the properties file with the id like we do in ResourceBundle. If I keep the properties file in the config directory of the Sun App Server instance , then it is working fine. But If I don't keep it there, then it is giving me a file not found exception.
    My SQL class which is accessing the properties file are in same package (com.company.sql). But still it is not able to find the file. As suggested by you, I tried it by giving the path as com.company.sql.SQL. Still it did not found the file. The file is there inside the WEB-INF/classess/com/company/sql/.
    Thanks
    Amit

  • Japanese unicdoe properties file

    I have a japanese resource bundle file in SJIS encoding (*.properties)
    I used native2ascii from JDK and convert SJIS to unicode.
    Then read japanese ( in unicode properties file ) from servlet and send to IE browser.
    but IE will display all "?" s
    On the other hand it display correctly if I use SJIS encoded properties file. ( which has a problem -- all SJIS character with "/" character will need to manully escaped "//" )
    I wonder why unicode properties file doesn't work?? I thought we should always convert properties file to unicode to avoid the escape problem of "/" character.
    thanks

    Regardless of charset, all HTML files should begin with an appropriate charset meta tag.
    The JSP for this:
    <%@ page contentType="text/html;charset=UTF-8" %>
    The HTML for this:
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    What charset encoding are sending to the IE browser? Is it UTF-8? UTF-16? something else?
    Regards,
    John O'Conner

  • Load the path for properties files

    Hi;
    My application uses of the properties files which are stored in a repertory /properties at the same level that JAR.
    I search an good means to configure the path of the files properties: for example: a environment variable or another mean?
    My application will read from this env variable (or another means) the path where are stored the files to use them.
    Regards;

    If the properties file is fixed, then it's best to make it a resource as suggested and put it inside the jar.
    OTOH if you have a situation where the properties file is dependant on installation or even writable then that won't do.
    In a lot of cases where the properties are variable it's better to use the Preferences class, on Windows this will put the data in the registry.
    You can use a command line argument, of course, to specify the location of your configuration file. I tend to use java System.getProperty and -D command line switches. That has the advantage that you don't have to send the value down from main() to where you are using it.

  • Use of CatalogTools property file

    Hi All,
    When we can configure everything about a repository in it's properties file, what is the use of CatalogTools.properties file iin ATG.
    Please give us the brief description.
    Thanks,
    Kushal.

    CatalogTools.properties defines the component that is used to access the properties of your catalog.
    It points to a class which contains the functions for access methods for the catalog properties.
    Ideally all the methods which directly communicate with your catalog should be in this component.
    As the ATG commerce programming guide describes it - "The tools component that performs low-level operations on the catalog repository"
    Prakhar

  • Read resourceBundle properties file from KM

    Hi,
    I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
    Now I'm developing a new LinkCommand service for the UserDetails.
    http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
    The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
    For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
    Can anybody help me?
    With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
    Regards,
    Stefan

    Hi Praven,
    Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
    I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
    I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
    I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new.

Maybe you are looking for

  • My built in i sight is not working please help me

    it worked bout a week and a half to take a picture on myspeace and i tried to see my friends on msn on the webcam and bnothing i cant see my self at all they can only hear me it says configure camera or something like that and something bout quiting

  • Error message saying Apple ID has been disabled

    looking for some help!  I'm trying to enter a new ITunes card number to my acount and I'm getting an error message saying my Apple ID has been disabled.  Any ideas on how to fix this so that I can enter the card number?

  • Need to decrypt the file in windows 8 (VS 2012) and WP8.1(VS 2013).

    I am decrypting a file which is already encrypted and working fine android app I tried this code in Windows 8 using Visual Studio 2012.   public string pw = "3x5FBNs!"; public string AES_Decrypt(string input, string pass)       SymmetricKeyAlgorithmP

  • Unable to map the timecard field to "Add'l Element Entry Info." DFF

    Hi everyone, If anybody know how can I create the field in self service timecard layout that is mapping into Add'l Element Entry Info at element level? I follow the steps that listed in OTL implementation guide as welll as the steps in OTL timecard c

  • Download usage is going up very fast, even when no...

    My son has BT Infinity and has tried to find out why the downloading keeps going up  - upto 1 GB a day, even when he is not using the internet, and when they do its only things like facebook. He doesn't stream movies or anything like that. He went to