Configure properties file that java file uses in OSB.

I have a jar file consisting of java files which maintain the session id in the queue. One main jar depends on 3 more jars for logging.
Also java files in the jar depends on the *.properties file to read the queue length dynamically.
I need to access the main jar from osb proxy server. I used java callout to access the java method provided in the main jar.
My question is: where should I place *.properties which is used by java class, in the osb folder. I don't see how I can add *.properties in the osb console.
Your timely help is greatly appreciated.

sudheshna wrote:
another java class which loads property file...I'm understanding that you don't have way to modify this +"another java class"+, but you have to figure out what strategy it uses to pick up the properties file... classpath? environment variable? absolute path? relative path?
If the file needs to be on the classpath (a common strategy) then you can just place the it in %DOMAIN_HOME%\config\soa-infra... This one is usually in the classpath... Other option is to change setDomainEnv.cmd(setDomainEnv.sh) to add a directory to the classpath and place the file there...
Hope this helps...
Cheers,
Vlad

Similar Messages

  • Application Module Configuration Properties file?

    Hi,
    Any body knows where could i find the Application Module Configuration Properties file on the disk.
    (This properties on wizard are appeared when we right click on application module and select configuration...)

    Curt,
    Thanks for your direction. That link is vary useful to be familiar with the AM configuration setting.
    Frankly, during last few months I was extremely busy to develop JSP pages. And didnt study much about AM But now that we are close to move the application to production I faced unacceptable problems. Recently I started to read your/and other folks treads to get more familiar with AM.
    Here is some of the problem i faced, which i think are AM related:
    1-The application speed goes down as soon as more than 2-3 browser(user) work with the same application(most probably I have memory leak).
    2-Some times I received following error when tried to load a JSP page in the application:
    Error Message: oracle.jbo.PCollException: JBO-28020: Passivation error on collection TXN, node id -1 void
    3-I faced following error when I tried to work with two applications in one or even two browsers:
    Error Message: JBO 30004: An application module that was not checked out was checked in...
    So, please let me know your idea on those and/or any point that I have to check.
    By the way, I am still on JDev9i-Beta and I accepted all default setting at the time I created AM . but the state of each page explicitly defined at the page level(mostly stateful, but on some of the pages i didn't mentioned the state which by default is stateless).
    Thanks.

  • How we write into properties file using get class method

    Hi
    I want to set some value into properties file using given code
    can any one please tell me how i can do this.
    property file
    setting.properties
    Name     =     abc
    and code I use is
    java.io.InputStream oInputStream = this.getClass().getResourceAsStream("Setting.properties");
                   Properties obj = new Properties();
                   obj.load(oInputStream);
                   String myName = obj.getProperty("Name");
                   System.out.println("myName :"+myName);
                   obj.setProperty("Name","def");
                   FileOutputStream oOutput= new FileOutputStream("Setting.properties");
                   obj.store(oOutput, "");
    thanks.

    You can't.
    If you have properties that change dynamically, you should not be using a properties file that sits in the classpath, you should be using Preferences, or a properties file that sits in some application or possibly even user directory, but not one in the classpath. The proper way to do this, would be to have a properties file in your jar (or otherwise in your classpath) that contains the defaults, and another one outside of the classpath in one of the twwo above mentioned areas, then, you read the default one only if the other doesn't exist, or you read the default one first, then read the other overwriting the values from the defaults.
    Don't forget to save the properties again (right after loading if you loaded, or always load, the defaults) after every change.

  • Get the pc name with domain name and add it to my properties file using commands

    i want to get the pc name with domain name and add it to my properties file using powershell  .
    sid

    function Get-Environment{
    [environment]|Get-Member -Static -MemberType Properties |
    ForEach-Object{
    if($_.Name -ne 'StackTrace'){
    $v=[scriptblock]::Create("[environment]::$($_.Name)").Invoke()
    New-Object PsCustomObject -Property ([ordered]@{Name=$_.Name;Value=$v[0]})
    Get-Environment
    Get-Environment | Out-String | Out-File environment.txt
    ¯\_(ツ)_/¯

  • Need example of properties file use

    I'm writing a text based adventure game to get some practice with the Java language. The only thing that's proving to be difficult is saving the game. I need an example of a class for basic properties operations. I've found various tutorials that all have some helpful information, but putting it all together isn't working for me. Here is what I have.
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    public class SaveGame{
    public static void CreateSave(String name){//create the save file
        try{
            FileWriter fstream = new FileWriter(name+".properties");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write("*-=Character Information=-*");
            out.write("name= \ngender= \n");
            out.write("*-=Basic Stats=-*");
            out.write("str= \nagl= \nend= \nchr= \nitl= \nlck= \n");
            out.close();
            }catch(Exception e){System.err.println("Error: " + e.getMessage());}
    }//CreateSave
    public static void SaveStatus/*save all variables to the file*/
    (double str, double agl, double end, double chr, double itl,
      double lck, String name, char gender){
    // I don't know how to edit values
    }//SaveStatus
    public static void ReadSave(){//reads the file and sends the variable back to main class
    }//ReadSave
    }//class The big thing is, I don't know how to edit the values in the properties file. I can handle reading them but i don't know how to convert the string values to int, double, etc. Thanks in advance.

    Dillon_91 wrote:
    Thanks for those.
    Can you link to a decent tutorial on the properties class? Most of what I've found is a little more technical than I'm ready for, and they don't have examples.Suns own Java tutorial has some code snippets, that should get you going - [Properties tutorial|http://java.sun.com/docs/books/tutorial/essential/environment/properties.html]

  • How can configure .properties file and  log4j on weblogic 8.1 SP5

    Hi,
    I know this is not right forum for post this question.But I hope I'll get my perfect answer here.
    I have 2 questions.
    1. Where I'll keep my .properties file in weblogic 8.1 SP 5. means I have one own .properties file which is contains some proxy settings and this .properties resides on .war file(now), But I want move this propeties file outside .war file. So Where I'll keep in weblogic 8.1 SP 5.
    2. How can we configure log4j in weblogic?
    Please reply me.
    Regards,
    Pattanaik

    You can add your.properties and log4j.properties to the classpath cant you?
    You just need to edit setEnv.cmd (if i remember correctly) in your weblogic server folder to add the folder containing the properties files to the classpath variable.

  • Configuration (properties file) in Visual Administrator

    Hi,
    properties files can be edited in Visual Adminstrator (under Configuration Adapter) and there is also a description field. I thougt it would be filled with comments in the properties file, but the description field is always empty. It is possible to fill this field?
    Regards,
    Roman

    Re: Storing constant values in OSB captures the earlier discussion.
    Re: OSB: What is best practice for reading configuration information
    Please go through above links and see they suit your needs.
    Thanks
    Manoj

  • HOw to access ApplicationResource.properties file using getSystemResource

    I am using struts. I need to access ApplicationResource.properties file, which I define my connection String there. All my methods are static method, so I cannot use getResourceAsStream() method from ClassLoader class, so i have to use getSystemResourceAsStream() method. However, I always get class not found error. Inputstream is always null.
    my ApplicationResource.properties file is stored in projectname/classes, and all my other classes store in projectname/classes/com/testname/. Can anybody tell me how to make it work? Thank you in advance.
    Here is my code:
    private static String getConnectionURL() throws FileNotFoundException,IOException,ClassNotFoundException
    Properties properties = new Properties();
    InputStream fromFile = ClassLoader.getSystemResourceAsStream("ApplicationResources.properties");
    if (fromFile !=null)
    properties.load(fromFile);
    String connectionURL = properties.getProperty("progressiveURL");
    return connectionURL;
    }

    Try either:
    ClassLoader.getSystemResourceAsStream("/ApplicationResources.properties");
    or
    YourClass.class.getResourceAsStream("/ApplicationResources.properties");
    in either case, you need to add the "/" prefix.

  • How to write non-XML data to a file using an OSB FTP Routing?

    Hi --
    Situation ... I need to write non-XML data to a file using FTP. A proxy service retrieves XML and transforms it with XSLT to CSV format, then gives it to a Biz service to file it out, using FTP. Simple.
    Problem ... OSB sends the contents of $body to any service it calls. Because $body is a SOAP document, it has to contain XML. So therefore I have to put my CSV data into an XML element, in order to put it into $body; and this inner element then gets written to the file, which I don’t want. But if I don't enclose my CSV content in a tag, I get "Unexpected CDATA encountered" trying to assign it to a variable.
    There has to be away around this!
    Thanks for your help.
    John Taylor

    Solved. Steps:
    -- Transform the XML to CSV using an XSL transform. Put the CSV data inside enclosing XML elements, and use a Replace action to put the XML element + CSV contents back into *$body*.
    -- Define an MFL transform that only knows about the enclosing XML elements. Use a delimiter of "\n" (hard return).
    -- Route from the proxy service to a Biz service that has Service Type = Messaging Service and Request Message Type = MFL; specify the MFL transform, which will receive the incoming *$body* variable, strip off the enclosing XML element within it, and pass the CSV contents to the FTP service.
    Edited by: DunedainRanger on Nov 29, 2011 9:03 AM

  • Configuring Logon groups for JAVA instances using NWA method

    Hello,
    we have a BI dual System landscape ( CI ABAP+ JAVA plus 2 dialog instance ABAP+JAVA, based on NW04s. I have set up a Web Dispatcher to do a load balancing for JAVA instances. I configured the logon groups according this documentation using NWA (http://help.sap.com/saphelp_nw04/helpdata/en/45/3dbe11a82b6bf1e10000000a1553f6/content.htm).
    The following points are still quite unclear for me:
    1. according documentation I should specify the following profile parameters:
    [Define the special HTTP URLs, which SAP Web Dispatcher uses to send to the AS Java to retrieve the logon groups information]
    wdisp/J2EE/group_info_location = [?] /JavaEE/public/icf_info/icr_groups
    wdisp/J2EE/url_map_location = [?] /JavaEE/public/icf_info/icr_urlprefix
    Wich values should i take here actually? These one or /J2EE/icr_groups and /J2EE/icr_urlprefix ?
    2. Also I have to configure (in visual administrator) the GroupInfoRequest and UrlMapRequest properties of the HTTP Provider service running on server processes. They recommend to use /J2EE/icr_groups and /J2EE/icr_urlprefix. Should it be the same values as defined in those profile parameters?
    3. I have defined the instance IDs and exacte Alias in the groups definitions in nwa. Is it possible to proof somehow while using my URL http://<host>:<port>/TestApp~test/<application_resource> either im web dispatcher (traces?) or on a web site on which DI I actually land to be sure that my load balancing works properly and i don't land on my Central Instance?
    Thanks a lot in advance for your advices.
    best regards,
    Polina

    Understood, Install the web dispatcher and configre the ABAP Message Server Port and ms/http_port (T-CODE:SMMS). Test this link
    http://host:port/sap/public/icf_info/icr_groups
    and this would retrieve the list of ABAP (SMLG) cofigured groups.
    For java load balancing, icm of that host will send the incoming requests to JAVA Dispatcher. The load balancing happens on the basis of server nodes and can be found in the web dispatcher session dispatching table.
    There are no necessary parameters required for java load balancing except the number of server nodes you'll hookup to that dispatcher.
    There is an option called service based, where we configure the j2ee hosts to accept the connections for the services which are running but I haven't seen much customers using this option.
    Bottom line: No changes are required for java side and enable the "ext rfc" option for abap logon groups and rest will be taken care by Web Dispatcher.
    Use connection pooling and high timeouts to acheive the better througput and use the SSL termination on Web Disp.

  • Execute java code taken from a properties file

    I have a requirement to store some java code in the Properties file & use the code inside the program later. Is there a way I can execute this code after I get it from the .properties file which is retrieved using the ResourceBundle?
    Example:
    File: system.properties
    Item_list=blocksBean.menu(QueryValue,request.getContextPath())
    Inside my Java program I'm using this..
    theBody=codesBean.replaceAll(theBody, "%%menu%%",ResourceBundle.getBundle("system").getString("Item_list"), true);
    instead of
    theBody=codesBean.replaceAll(theBody, "%%menu%%",blocksBean.menu(QueryValue,request.getContextPath()), true);
    This doesn't work because ResourceBundle.getBundle("... returns the value.. which is a string "blocksBean.menu(QueryValue,request.getContextPath())". But what I need is it has to be executed..
    blocksBean.menu() returns a string value of html code fetched from the dartabase.
    Is there a way I can execute blocksBean.menu() which is retrieved from the .properties file.. If anyone has done it / have an idea on this.. please e-mail me [email protected]
    I need something like an eval() in javaScript..
    Thanks in advance
    -ashok

    These boys might have something that will help you:
    http://www.beanshell.org/
    Good luck
    Lee

  • How to use JDBC Appender of log4j using a properties file

    Hi,
    I am trying to implement the Log4j JDBC Appender to log the messages to Database(oracle).Can anyone provide me with a sample code along with the properties file used.
    need urgent help.
    Thanks in advance

    Actually, I konw where my problem in my code is. Use functions  
    PDDocAcquirePage(), PDPageGetAnnot(),
    PDTextAnnotGetContents(),
    PDTextAnnotGetContents()
    step by step with the logic designed by ourself can finish my task.
    But also thanks for your help!
     

  • 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.

  • Direction of middle eastern languages in properties file

    Hi,
    I am hoping someone can point me to an authoritative source or document specifying which direction the Hebrew / Arabic / Farsi text should be entered in java properties files. That is, does it follow the natural direction of the script (right-to-left) or does it follow the direction of key (left-to-right)? I have tried searching without much luck.
    For example:
    sample.properties
    # english properties file
    sample.text=hellosample_he.properties (for the purposes of demonstration I am using english characters, in reality this would be the Hebrew and escaped)
    # hebrew properties file using the natural direction (right-to-left)
    sample.text=molahsOR is it
    # hebrew properties file using the english direction (left-to-right)
    sample.text=shalomthanks in advance,
    Ben

    Why don't you just do a test? It's a simple matter of applying a few Arabic strings to a properties file and checking how it looks in the UI.
    Or try thinking about it for a couple of seconds - how would a translator (anybody creating the bidi localized versions) create the left-to-right version you describe?
    Anyway, the answer is that bidi text in properties files is entered and stored the way bidi text is entered and stored in any other normal text file.

  • Properties files with Tomcat 4.0.1

    I'm having trouble finding properties files using Class.getResourceAsStream
    Properties props = new Properties();
    try {
      props.load(Class.class.getResourceAsStream("/Database.properties"));
    catch (IOException e) {
      //error reading from stream
    }The above code works fine on several web server (including Tomcat 3.2.3), but fails on Tomcat 4.0.1 - the server takes around 50 seconds to return a response, then throws a StackOverflowError. The properties file is in WEB-INF/classes.
    Has anybody else had the same problem?

    Thanks for the reply Guido.
    However, I can't use the ServletContext to load the files I'm after, because the code is part of the data tier and should not be dependent upon the controller (in fact I have no reference to the ServletContext).
    If I can't use Class.getResourceAsStream in Tomcat 4, does that mean that any third party APIs that rely on it will fail? - seems a little strange to me!
    The Tomcat 4.0 documentation says:
    "All unpacked classes and resources in the /WEB-INF/classes directory of your web application archive, plus classes and resources in JAR files under the /WEB-INF/lib directory of your web application archive, are made visible to the containing web application, but to no others."
    I would expect "All unpacked classes and resources" to include all unpacked resources (such as properties files)
    I've now managed to load the properties file using this code:
    props.load(new FileInputStream(getClass().getResource("/Database.properties").getFile()));(don't know why getResource should work when getResourceAsStream doesn't, but that's what appears to be happening).
    Now I have a new problem - loading a JDBC driver. I get:
    java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    when I call
    new OracleConnectionCacheImpl()
    but the class does exist, in a zip file (OracleThinClientJDBCDriver_901.zip) in WEB-INF/lib. It looks to me like the oracle code in the lib directory has been found by the ClassLoader, but that Class.forName does not work...eh?!?

Maybe you are looking for

  • Wireless Internet access via requires unplugging cable modem -

    I have a brand new MacBook Pro with Snow Leopard (10.6.1) and Airport Express (7.4.2). I have high speed Internet via Comcast/cable modem. I spent 30 minutes with the Apple Tech Support folks and was finally able to get wireless internet access. Howe

  • Why won't menus work or show when web DVD is uploaded to Revel ?

    I need to be able to upload  and share privately a web DVD with functionl menu system. I have created several for test and tried to upload to different hosts including Adobe Revel, the video upload will play, but does not show a menu. What am I doing

  • Problem when creating Database (Database, OS and hardware Configuraiton)

    Problem when creating Database: There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database givin

  • Syncing iPad notes to be seperate from iPhone notes

    Hello. I sync my iPhone notes with iTunes. I have separate notes on my iPad that I would like to back up and sync as well. How can this be done so that I don't have my already synced iPhone notes show up on my iPad? Every time I have my iPad plugged

  • Attaching smartforms and print prog to invoice

    hi ive developed a smartform and a print program. da program has a selection screen dat asks user for doc number(vbeln). it den displays data in da smartform. now ive to attach it to va02. wen i attach it using v/40 output type(RD000) program name :