Where to put basic properties?

Hi all,
I have a situation were I would like to have a set of properties
accessible to the code
outside the framework of servlets/ejbs (they are for some utility
classes that need to be useful
outside of the context of Weblogic)
At the moment I am relying on environment variables passed to the JVM
via -D
to tell me a few things that I cannot figure out how to put anywhere
else.
they are the following properties :
irsa.jis.xml.parser class name of a SAX2 parser
irsa.jis.config absolute name of an xml config file that will
contain all
the other app-specific properties I
need.
Any thoughts on the best way to do this without modifying the
startServer script, or hard
coding them?
Thanks for any insight,
Serge Monkewitz

I am cutting and pasting now :)
The support for this product is amazing, thanks again
Serge
Wei Guan wrote:
Looks like "Chicken & Egg" problem.
You can get thesse information in your code:
T3Services.getT3Services().config().getProperty("weblogic.system.home");
T3Services.getT3Services().config().getProperty("weblogic.system.name");
T3Services.getT3Services().config().getProperty("weblogic.cluster.name");
T3Services.getT3Services().config().getProperty("weblogic.home");
Let's say, if you want to put your property in your per-server directory,
try this:
T3Services.getT3Services().config().getProperty("weblogic.system.home") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.cluster.name") +
File.seperator +
T3Services.getT3Services().config().getProperty("weblogic.system.name") +
"mysoftware.properties";
Hope it helps.
Cheers - Wei
Serge Monkewitz <[email protected]> wrote in message
news:[email protected]...
Thanks for your reply, but I am already doing exactly what you suggest.
The thing is, I need a property that gives me the location of the propertyfile
Serge
Wei Guan wrote:
Put your properties in a property file, use startup class to load this
properties file to a Singleton object so that it can be accessed
elsewhere.
Cheers - Wei
Serge Monkewitz <[email protected]> wrote in message
news:[email protected]...
Hi all,
I have a situation were I would like to have a set of properties
accessible to the code
outside the framework of servlets/ejbs (they are for some utility
classes that need to be useful
outside of the context of Weblogic)
At the moment I am relying on environment variables passed to the JVM
via -D
to tell me a few things that I cannot figure out how to put anywhere
else.
they are the following properties :
irsa.jis.xml.parser class name of a SAX2 parser
irsa.jis.config absolute name of an xml config file that
will
contain all
the other app-specific properties I
need.
Any thoughts on the best way to do this without modifying the
startServer script, or hard
coding them?
Thanks for any insight,
Serge Monkewitz

Similar Messages

  • Where to put the properties file

    I am a new user of NetBeans6.0, I am making a simple application for user registration. I have coded everything but when I run project I get error caused by the dao.properties file load problem.
    I have put the dao.properties file inside the classes directory(where all java class files are build after running the project) of my web application directory( I didn't create this directory though, it is automatically created by IDE), I think there is a problem with its path.
    where should I put the dao.properties file so that when I run the project the Tomcat automatically find it and also, what the settings I should do?
    actually, I have referred to BalusC'd  DAO tutorial: the data layer but that comes in use when we are working off the IDEs, In my case since I am using Netbeans so it may be different from that one.
    if someone already done that then please let me know

    ok, but will it work if I upload the project in a remote host?
    lets talk besides IDE, as in your DAO tutorial you have instructed to put the properties file somewhere in root of the classpaths. ok, it will work on a local computer cause there is classpath setting but since remote host doesn't know about that property file and we cant set classpath at remote host(I am not sure though if we can) then how will it work at remote host.
    how the server at remote host comes to know about that property file?
    In my case since I have made the project using IDE and everything regarding classpaths have been set automatically(IDE done itself), but at remote host these sort of settings are not done then how the project will run?
    if I have described my problem incorrectly then please consider it as it is supposed to be.

  • Where to put jndi.properties in Web application to lookup remote EJB?

    Hi All,
    I want to use EJB deployed in an OC4J from web application deployed in another OC4J.
    I've try to put jndi.properties file into WEB-INF/classes; package it into a jarfile and put into WEB-INF/lib, ... In all case, it doesn't work.
    If I hard-coding the env properties as following, it works.
    env.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory" );
    env.put( Context.SECURITY_PRINCIPAL, "oc4jadmin" );
    env.put( Context.SECURITY_CREDENTIALS, "welcome1");
    env.put(Context.PROVIDER_URL, "opmn:ormi://fmtresearch:6005:home/TEST");
    But if I put those env properties in jndi.properties file, it doesn't work.
    java.naming.factory.initial=oracle.j2ee.rmi.RMIInitialContextFactory
    java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=welcome1
    java.naming.provider.url=opmn:ormi://fmtresearch:6005:home/TEST
    Note that, the jndi.properties work if it is used in client application.
    Please help me! Thanks.

    This may not help you directly. However, did you try printing the environment properties in the InitialContext you created.
    Another thing.
    You can use this function after creating the initial context to see the JNDI tree and see if it contains anything.
    Thank you.
    Function To list the JNDI Context name-object bindings
    private void listContext2 (Context ctx, int ind, String name, String spaceIndent) {
    String indent = spaceIndent + "[" + Integer.toString (ind) + "]" ;
    try {
    System.out.println (indent + "{" + name + "}");
    NamingEnumeration justList = ctx.list(name);
    while (justList.hasMore()) {
    NameClassPair listItem = (NameClassPair) justList.next();
    String className = listItem.getClassName();
    String subName = listItem.getName();
    boolean isRelative = listItem.isRelative();
    String relativeName = ("".equals(name) ? new String(subName) : new String (name + "/" + subName));
    listContext2 (ctx, (ind+1), relativeName, (" " + spaceIndent) );
    catch (Exception exc) {
    System.out.println ("Exception Occured at listContext2");
    Hope it helps not deviates. Good luck

  • 10g UIX Where to put ResourceBundle?

    I'm looking at putting all my Strings in a ResourceBundle for my UIX pages. I've read the documentation for Internationalization, but I think the piece that I'm missing is where to put the properties file. Say I've got a file called 'strings.properties', and my provider looks like this:
    <provider>
         <data name="bundle" >
              <bundle class="strings.properties" />
         </data>
    </provider>Then where in the JDev project do I need to have the file in order for it to get deployed properly and found by the UIX framework at runtime?
    Also, just to be sure I'm not going crazy, I know that the documentation and even the bundle tag say to specify a Class, and I just noticed that the ResourceBundle javadoc also says that the 'baseName' parameter to the static 'getBundle' method should be a 'fully qualified class name', but I've always just given it a filename of a properties file before. So I'm assuming that the 'class' parameter to the bundle tag can be a properties filename -- is this correct?

    Whoops! Of course, the argument to the bundle class attribute should just be 'strings'.
    After some experimentation, I discovered that if I put the properties file at the root of the 'src' directory in my JDev project, then it gets transferred to the 'classes' output directory when I compile. This works for running my project in the Embedded OC4J. I haven't tried deploying it to any other app server yet. Is this the right place?

  • Where to put the commit in the FORALL BULK COLLECT LOOP

    Hi,
    Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
    'commit' :
    open f_viewed;
    LOOP
    fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
    forall i in 1..f_viewed_rec.count
    insert into jwoodman.jw_job_history_112300
    values f_viewed_rec(i);
    --commit; [Can I put this 'commit' here? - Jenny]
    EXIT when f_viewed%NOTFOUND;
    END LOOP;
    commit;
    Thanks,
    - Jenny

    mc**** wrote:
    Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
    When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
    That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
    If you use commit outside the loop,
    Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
    Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
    I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
    When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
    What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
    Why is frequent committing undesirable I hear you ask?
    First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
    Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
    This then brings us two rules of thumb that will always lead a developer in the right direction.
    1. Commit as infrequently as possible, usually at the logical unit of a transaction
    2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
    Regards
    Andre

  • Where to place ResourceBundle properties files

    I have written a servlet that will serve content in different languages
    depending on the user's browser settings.
    The problem is my servlet cannot find the resource bundle properties fiel
    even though I put it in the server classes directories.
    Namely:
    /weblogic/myserver/servletsclasses
    /weblogic/classes
    /weblogic/myserver/serverclasses
    Can anybody tell me where to put my resource bundle properties files??
    regards
    EM

    "Ee-Ming" == Ee-Ming Toh <[email protected]> writes:
    Ee-Ming> I have written a servlet that will serve content in different languages
    Ee-Ming> depending on the user's browser settings.
    Ee-Ming> The problem is my servlet cannot find the resource bundle properties fiel
    Ee-Ming> even though I put it in the server classes directories.
    Ee-Ming> Namely:
    Ee-Ming> /weblogic/myserver/servletsclasses
    Ee-Ming> /weblogic/classes
    Ee-Ming> /weblogic/myserver/serverclasses
    Ee-Ming> Can anybody tell me where to put my resource bundle properties files??
    First of all, it would be useful if we knew what version of WebLogic you're
    using. There's considerable differences between versions.
    In general, if you have a standard WAR structure, you're better off putting
    properties files in the "WEB-INF/classes" directory of your WAR structure. If
    you do that, you have a chance of being able to redeploy the changed properties
    files without having to restart the server.
    ===================================================================
    David M. Karr ; Java/J2EE/XML/Unix/C++
    [email protected] ; SCJP; SCWCD

  • Where to store mysap.properties file?

    Hello,
    I'm trying to test application Test User Management under SAP J2EE engine of SRM UM. When I run page:
    http://mysite:54000/logon/TestUM
    there is an message:
    Test is disabled, please specify UM_TESTUM=true
    I assume that this "UM_TESTUM=true" setting should be put in mysap.properties file. My question is where to store mysap.properties file?
    Somewhere here?
    c:\usr\sap\SRM2_UM\j2ee\j2ee_40\cluster\server\services\servlet_jsp\work\jspTemp\logon\
    Thanks
    m./

    Path for tat file is:
    c:\sapmarkets\properties\mySAP.properties
    BR
    m./

  • Error putting Card properties?

    Hi,
    I keep encounter following error during the crawler process, no card has been created. (I've used DocFetch)
    Aborted Card creation for document: mail.gif. Import error: IDispatch error #19808 (0x80044f60): [Error Importing Card.Error putting Card properties.]
    Can anyone give some hints?
    Thanks and Best Regards,

    This is a new install with DIAdem 2012 SP1 downloaded within the last 30 days from your site running in evaluation mode.
    There has never been another version of DIAdem on this laptop.
    >> Did this ever work, or has it failed on your first ever attempt?  If it did work once, what has happened to this computer between then and now?
    I can't give an honest answer here because I don't remember. It only failed in the last couple of days (that I noticed) and has been used since 12/17/2013. I could go back to a restore point, but I've installed 
    >>Have you installed LabVIEW on that computer before?  If you have LabVIEW 2012 or later, can you pop up the DataPlugin selection dialog from there?
    no
    I'm trying this today, and am now getting the same error when I try to create a new plugin using the "create dataplugin..." button in the same dialog box. I know this worked before or I wouldn't have been able to create plugins. the import dataplugin button works.
    Are there some kind of registry keys or files on the computer which I can clean out after an uninstall (or prior to a repair) to make sure a reinstall is completely new?
    Do you have any idea what/where the suddlgshow that the error is generating is refering to? Maybe I can check the permissions on that folder, maybe they are set to read only or something.
    Thanks,

  • Where to put property files used by XSLT extensions?

    Still fighting with Java XSLT extensions. I have narrowed the
    problem down: my XSLT extension cannot find its property file,
    which I use to store JDBC connect strings etc.
    What is the proper directory to put this file so the XSLT
    extension class can find it? I am using Oracle HTTP Server with
    XDK 9.0.

    Thanks for the answer, Steve!
    Depends on what call you're using in your extension function to
    read your properties.Maybe I tried a too simplistic approach. I'm just using this:
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("/foo.properties"));
    etc.
    This (with the slash) works if the properties file is in the root
    directory of the filesystem, but it's a kludge.
    If you read your properties as a resource using
    getResourceAsStream(), then where the classloader expects to
    find your file depends on the resource name that you specify.So maybe I should use getResourceAsStream() then? What if I put
    the properties file inside the JAR with the extension classes?
    Or is there any way to reference the web root?
    --Jere

  • Where i Put my swing application jar file in jboss

    Hi experts...
    I develope swing application and convert it into jar file....I know jnlp deployment using tomcat..In tomcat i
    put my appcation.jar in webapps/root folder...This is not similar in jboss..I dont know where i put my applcation.jar in jboss.If any body know the idea please let me know..

    Hi
    You have to put your jar file in
    server/default/deploy
    Regards
    M Fazal Ur Rehman

  • I changed my iPhone lately but i can't restore my last backup since it keeps saying "itunes could not restore backup because the password was incorrect" but I don't know where to put the password to make it happen... Any suggestions?

    Hey guys,
    I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?

    Select your iDevice in the iTunes.
    Choose the Summary screen (tab) and scroll to the bottom of the screen.
    Then un-select Encrypt iPhone backup.
    iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally.

  • My computer screen keeps going blank and then going back to the box where I put my password in to start my comp. Why is this happening?

    My computer (Macbook) was working fine this am. I left it for an hour and then came back and the screen was black (always does that as the screensaver hardly ever works). I moved the mouse to wake it up and everything was normal. I went to adjust the volume and the screen went blank and the main page with the box where I put my password in when I first start my comp appeared. I put my password in and everything was normal again. I opened a window in Safari and before it loaded completely the same thing happened, the screen went blank and went back to the password box. Does anyone know why this is happening? I don't have an external hard drive or any blank flash drives so I can't back anything up right now and am afraid I'm going to lose everything. Thank you

    Sounds like hardware failure, called boot loop. Call Apple and or go on apple.com and make Genius Bar appointment to have your iphone reviewed by a Tech. Provided you iphone shows no physical or liquid damage they will take care of you, or if you have Apple Care Plus
    Genius Bar Rerservation :  http://www.apple.com/retail/geniusbar/

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • Where to put javascript code?

    Hello,
    I am trying to set some columns in a list as "read-only" and is using the following code:
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
    </script>
    But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part,
    or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
    Thanks a lot!
    Patrick

    You can try this:
    1) Open your Sharepoint List. Go to List edit view.
    2) On right side of Ribbon you will find "Form Web Parts" option as shown in figure.
    3) Choose your List form which you want to edit.
    4) Now you can add web part in new window.
    5) Add Content Editor Web part.
    6) In content editor web part add the path of your "txt" file in which you have written your script, for eg.
    <!DOCTYPE html>
    <html>
    <body>
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById('4_ctl00_ctl00_TextField');
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push("SetReadOnly()");
    </script>
    </body>
    </html>
    I haven't tried this method so I am not sure but hope it works...:D
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • This is less a question and more of a suggestion and I am not sure where to put it..... I would like an update that would allow you to have a tone for each individual email account

    I am not sure where to put this but I would like individual tones for all my email accounts

    Wonderful suggestion.
    You can give Apple feedback here > http://www.apple.com/feedback/
    Hop that helps

Maybe you are looking for

  • How to Print Large PDF on multiple sheets

    I want to print a file 41" x 55" on multiple sheets of paper, how do i accomplish this? I have tried and i only get one page with only one small section of my painting/drawing. Need help!

  • Call Park service causing high CPU usage

    Hi, I've got a Lync 2013 pool with 4 servers running.  Everything is working fine except I notice that when I enable the call park service, the CPU usage goes from hovering at around 4% to jumping all over the place (anything from 11% to 30%).  I've

  • My i mac keeps freezing an

    my i mac keeps freezing and I keep getting this message: VTDecoderXPCService quit unexpectedly.  What's wrong or what can I do to solve it?

  • Convert MM/DD/YYYY to MMDDYYYY

    Hi, I am getting dates like: 6/13/2005 10/6/2005 etc I want to convert it to 06132005 10062005 PLease help with the code Thanks SAPBW

  • Airport Express and phone interference

    When my home phone rings or we make a call, our wireless internet connection (airport express) disconnects. Has someone already had this issue? if yes, is there any solution to resolve it?