Faster way ?  properties file vs weblogic.xml jndi context

Anyone knows what is faster way to get a value from a parameter,
a) using a properties file
b) using jndi context ( env-entries )
Anyway to get new values from a runtime changed files ?
Regards
jsanza

The real question is what are you trying to do, since that may make the
decision. If you need to be able to change a parameter, either build
parameter maintenance into your app (a page for example) or use the file
method so you actually edit the stuff.
JNDI is in-memory, which is fast. Pulling from disk will be pretty fast too
on most systems (typically it is from memory if the file has been changed,
since everything used gets cached by most OSs).
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"jsanza" <[email protected]> wrote in message
news:3b72c402$[email protected]..
>
>
Anyone knows what is faster way to get a value from a parameter,
a) using a properties file
b) using jndi context ( env-entries )
Anyway to get new values from a runtime changed files ?
Regards
jsanza

Similar Messages

  • .war file vs properties files in weblogic 5.1

              I work with WebLogic 5.1 and I'm trying to deploy a web application which gets
              a properties file. If I deploy it as an expanded directory hierarchy (with the
              properties files into WEB-INF/classes) I have no problems. While deploying it
              by a .war file I get this message: "en_GB java.util.MissingResourceException:
              Can't find resource for base name Agent, locale en " (the getBundle() method is
              trying to get an english property file). What could I do? Is it really a weblogic
              5.1 bug?
              Thanks,
              David
              

    This issue comes up repeatably. It's a real bug.
              I believe this problem was fixed in a 5.1 service pack, but I'm trying to
              find out the exact disposition of the issue. Noone seems to be complaining
              about this under 6.x, so a fix seems to have been made, the only question is
              whether or not it got back-ported to a 5.1 service pack.
              Gary
              david <[email protected]> wrote in message
              news:3ac4a39a$[email protected]..
              >
              > I work with WebLogic 5.1 and I'm trying to deploy a web application which
              gets
              > a properties file. If I deploy it as an expanded directory hierarchy (with
              the
              > properties files into WEB-INF/classes) I have no problems. While deploying
              it
              > by a .war file I get this message: "en_GB
              java.util.MissingResourceException:
              > Can't find resource for base name Agent, locale en " (the getBundle()
              method is
              > trying to get an english property file). What could I do? Is it really a
              weblogic
              > 5.1 bug?
              > Thanks,
              > David
              

  • Encryption for properties file in Weblogic server 6.1

    My application needs to connect to a file server. I need to encrypt the password in properties file. Is there a built in encryption tool in weblogic server 6.1 to achieve that?
    Thanks

    My application needs to connect to a file server. I need to encrypt the password in properties file. Is there a built in encryption tool in weblogic server 6.1 to achieve that?
    Thanks

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

  • JNDI Properties file

    Hi,
    Im having trouble setting up my first J2EE EJB and client program. I have managed to pinpoint the problem to be with the selection of the JNDI service provider (keep getting a NoInitialContextException).
    Both client and EJB are on the same machine, and Im using Sun's app server v8 . Could someone tell me what I should have in the jndi.properties file, and where this file should be put. I have tried hard-coding the details into the program, but w/o success.
    I assume that using the jndi.properties file will assign a provider globally across all applications in this server - is this true?
    Thanks.

    I read somewhere that the standard j2ee.jar file (which I have in my classpath) contains a default jndi.properties file to allow basic JNDI access.
    If this is true, then the problem is not with these properties. Heres what I have:
    I compiled the classes using javac, no problems (j2ee.jar is in the classpath).
    I am trying to run the client using java -classpath ClientApp.jar FirstClient, where ClientApp.jar is the stubs/skeletons produced at deployment. This method keeps throwing a NoInitialContextException.: need to specify class name . . .
    I also tried using appclient, but that threw even more errors (not entirely sure whats going on here).
    I have checked over my code, and as far as I can see the problem is not in there - Im sure its something to do with the classpath or something - is there a classpath I should be adding to get the client working?
    Why is J2EE so hard to learn? I find myself struggling more with footery errors than I do actuially reading and learning about how to use it.
    Thanks.

  • Usin properties file in bpel

    Can I use properties files with bpel (if can how it does?)
    for tune some region options

    You could write a custom xpath function and plug-in to the bpel engine to do this job.
    The custom xpath function can read a property file and convert into a xml element and use that xml element inside bpel.
    The tricky part is to map the properties file into a xml schema and convert the properties file into xml document. Inside bpel, the variables refer to xml elements.
    Another easy solution is to use java <exec> to do the same.
    -read file
    -change your mail/portal data inside the java exec using setVariableData() function.

  • How to read properties file?

    hi,all friends,can you tell me how to get information from the properties
              file such as weblogic.properties or
              user defined properties file? And where should I put the properties file?The
              location of properties file
              should not be pre-defined in the source code.I wanna get the location of
              properties file from weblogic.properties .
              Help me and thanks a lot..
              Tony tian
              

              Hi Tony,
              for example in your init() insert such codes:
              Properties props = new Properties();
              FileInputStream fin;
              try {
              fin = new FileInputStream("weblogic.properties");
              props.load(fin);
              fin.close( );
              catch (IOException e) {
              throw new ServletException("blabla:", e);
              and verify the key, say: weblogic.system.bindAddr, you will get a string (exist) or null (non existing). for example:
              String s = props.getProperty("weblogic.system.bindAddr");
              if (s != null) {...} // existed
              else {...} // not existed
              Joe
              "Tony Tian" <[email protected]> wrote:
              >hi,all friends,can you tell me how to get information from the properties
              >file such as weblogic.properties or
              >user defined properties file? And where should I put the properties file?The
              >location of properties file
              >should not be pre-defined in the source code.I wanna get the location of
              >properties file from weblogic.properties .
              >Help me and thanks a lot..
              >Tony tian
              >
              >
              

  • Help in executing jsp files using weblogic server 6.0.

              I have an operating system Windows2000, i have downloaded 30 day trial version of weblogic server 6.0.
              I have a file called hello.jsp.
              Where do i have to save hello.jsp file in weblogic server 6.0.
              How do i execute hello.jsp through browser using weblogic server6.0.
              As there is no properties file in weblogic server6.0.
              TO run it i started default server and when i started default console it got opened in the browser as http://127.0.0.1:7001/console/index.jsp
              Where do i have to save it and how do i open it in the browser.
              Any help will be greatly appreciated.
              Thanks,
              

              I started the Start default Server and opened the http://localhost:7001/ in the bowser and by default
              this loaded the index.html file
              and when i tried to change index.html to hello.jsp i got the same error message as before
              Error 404--Not Found
              From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              10.4.5 404 Not Found
              The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
              If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
              "mils" <[email protected]> wrote:
              >
              >There are quite a few reasons it couldn't be working, and things you can try...
              >
              >Ensure there are no errors on startup of the server in the console, especially that there is not an error about another web listener running on the same port.
              >
              >Try just http://localhost:7001 by default this should load the index.html file that comes with the WebLogic installation.
              >
              >If you are running on a corporate LAN, your browser settings may not be set correctly to find "localhost", ensure that your browser is not using a proxy server for local addresses, or put localhost:7001 in the list of exceptions for which the browser should not look at the proxy server.
              >
              >Hope this helps!
              >
              >"Red" <[email protected]> wrote:
              >>
              >>I created hello.jsp file under E:\weblogic\wlserver6.0\config\mydomain\applications\DefaultWebApp_myserver\hello.jsp
              >>and i started the Start Default Server and when i try to open
              >>http://localhost:7001/hello.jsp in the browser
              >>getting an error message as
              >>
              >>Error 404--Not Found
              >>From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              >>10.4.5 404 Not Found
              >>The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
              >>
              >>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
              >>
              >>Any help?
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>
              >>"Mils" <[email protected]> wrote:
              >>>
              >>>In WebLogic 6.0, to run simple JSP pages with the default installation, the JSP files should be put in....
              >>>
              >>>C:\bea\wlserver6.0\config\DefaultWebApp_myserver
              >>>
              >>>...assuming you installation was on the C: drive.
              >>>
              >>>To access a file bar.jsp in this directory, go to http://localhost:7001/bar.jsp
              >>>
              >>>"Red" <[email protected]> wrote:
              >>>>
              >>>>I have an operating system Windows2000, i have downloaded 30 day trial version of weblogic server 6.0.
              >>>>I have a file called hello.jsp.
              >>>>Where do i have to save hello.jsp file in weblogic server 6.0.
              >>>>How do i execute hello.jsp through browser using weblogic server6.0.
              >>>>As there is no properties file in weblogic server6.0.
              >>>>
              >>>>TO run it i started default server and when i started default console it got opened in the browser as http://127.0.0.1:7001/console/index.jsp
              >>>>
              >>>>Where do i have to save it and how do i open it in the browser.
              >>>>
              >>>>Any help will be greatly appreciated.
              >>>>Thanks,
              >>>>
              >>>>
              >>>>
              >>>>
              >>>
              >>
              >
              

  • View properties file feature

    Hi all,
    Can this plugin display properties file (or other files loaded with loadjava utility such as xml files) loaded in the database ?
    If that's not the case, is such feature planned sometime in the future ?
    Many thanks,
    Teggy

    It depends on where you put it. With JSPs you can use Java to access the server's file system. This means you can place the properties files anywhere you want. If you place the properties file in a place accessable to the web, like under webapps folder in Tomcat, than the rest of the world can view it if they find its name. (note, the user will not see your JSP code when they access your site, they will only see the HTML output, so they will not automatically know the name of the properties file...) If you put the properties file outside the web-accessable context, like in a WEB-INF directory, then you can still access it through the JSP, and it will remain un-reacheable from the internet.

  • Properties File

    Are properties file secure? Would someone over the net be able to obtain my properties file used for a JSP page?

    It depends on where you put it. With JSPs you can use Java to access the server's file system. This means you can place the properties files anywhere you want. If you place the properties file in a place accessable to the web, like under webapps folder in Tomcat, than the rest of the world can view it if they find its name. (note, the user will not see your JSP code when they access your site, they will only see the HTML output, so they will not automatically know the name of the properties file...) If you put the properties file outside the web-accessable context, like in a WEB-INF directory, then you can still access it through the JSP, and it will remain un-reacheable from the internet.

  • Faster way to read XML files using power shell !!

    At the moment i have about 1000 XML files (ranging from size 15kb to 120kb), I have a powershell script which extracts information and writes all extracts to the same LOG file!!
    It works well but am only concerned with the time it takes!! it took about 1.5 hrs to finish the script! Is this normal?
    How can i speed it up, your inputs and thoughts helps!!
    Reading XML using the following syntax!
    $Inputfile=[xml](Get-Content $XFILE)
    Script has only foreach loop!  and no other conditions.
    cheers!

    For a small file it is about twice as fast.  It gets faster as the file size gets bigger.
    PS C:\scripts> Measure-Command {$xml=[xml](cat FooProx.xml -raw)}
    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 0
    Milliseconds : 275
    Ticks : 2758195
    TotalDays : 3.19235532407407E-06
    TotalHours : 7.66165277777778E-05
    TotalMinutes : 0.00459699166666667
    TotalSeconds : 0.2758195
    TotalMilliseconds : 275.8195
    PS C:\scripts> Measure-Command {$xml.Load("$pwd\FooProx.xml")}
    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 0
    Milliseconds : 108
    Ticks : 1081647
    TotalDays : 1.25190625E-06
    TotalHours : 3.004575E-05
    TotalMinutes : 0.001802745
    TotalSeconds : 0.1081647
    TotalMilliseconds : 108.1647
    ¯\_(ツ)_/¯

  • Classpath related problem:properties file/workshopLogCfg.xml

    Hi,
              I'm using wrokshop8.1. I want to use the config xml file workshopLogCfg.xml for log4j
              But when I tried to use DOMConfigurator.configure("workshopLogCfg.xml "),I got java.io.FileNotFoundExcedption,apprently it's not in the classpath---but it's under WL_HOME/common/lib----isn't it a default place the workshop will look into it? How can I specify it in the classpath within workshop(if not use commandline when start the weblogic server) or other ways to do that?
              A similar problem is,I need to read some parameters from a properties file to my program,where to put this properties file?I even tried to jar only this single properties file and put the jar in the Libraries of the Applciation in the workshop,but still get 'file not found' error---how can make it be in the classpath?
              Thanks a lot,
              -Yixin
              

    I'm believe that Java property -Dlog4j.configuration=%WL_HOME%\common\lib\workshopLogCfg.xml is registed to JVM during startup WebLogic.
              I think you should try to get config log4j by following example, it may eliminate the classpath problem.
              is it ans your question.
              Yos L.
              Example1:
              String log4jFileName = System.getProperty("log4j.configuration");
              DOMConfigurator.configure(log4jFileName);
              Example2: Iif you use WorkShop & WebService, in JWS file you can obtain logger by -
              Logger logger = context.getLogger("async.HelloWorldAsync");
              logger.debug("about to start timer");
              // all we do here is start the timer.
              helloDelay.start();
              logger.debug("timer started");
              http://e-docs.bea.com/workshop/docs81/doc/en/workshop/reference/configfiles/con_knexLogCfg_xml_ConfigurationFile.html

  • Weblogic.XML - Dynamic JNDI

    All,
    In my current application we have cluster set up with JDBC Session Replication enabled. Unfortunately, i was forced to give the persistent-store-pool and persistent-store-table value directly in the weblogic.xml. Is there any way, where i can configure these values in property files and load the JNDI value in runtime? Something like ${JNDI}, ${TABLENAME}..
    <session-descriptor>
    <timeout-secs>1800</timeout-secs>
    <invalidation-interval-secs>60</invalidation-interval-secs>
    <persistent-store-type>jdbc</persistent-store-type>
    <persistent-store-pool>${JNDI}</persistent-store-pool>
    <persistent-store-table>${TABLENAME}</persistent-store-table>
    </session-descriptor>
    </weblogic-web-app>
    Kindly help me on this aspect.
    Thanks in Advance.
    Cancer.

    Kalyan,
    Thanks a lot for your quick response.
    We have different environment @ our end. Each will have different Connection Pool JNDI Name configured. we maintain a property file that holds the list of JNDI configured in that environment. Application runs without any issues.
    When it comes to weblogic.xml - i cannot have the same JNDI configured in all the servers .
    As of now, we will deploy the same WAR file across servers, all the JNDI name will be fetched from the property file.
    Is there any way i can get the JNDI name from outside the WAR file?
    Regards,
    Cancer.

  • Deploying properties files outside of the web application in WebLogic 8.1

    Hi
              I am wondering if it is possible to deploy a web application and place configuration files (properties files, log4j xml files etc...) in a folder somewhere within WebLogic that is on the Server instance classpath. This would allow me to edit the config files and restart the server without having to hack into the web application .war file and then redeploy.
              I am really looking for an equivalent of the /applib folder in Oracle 10gAS (each OC4J server instance has an /applib folder which is on the classpath of the server).
              Is there an equivalent for a weblogic server instance?? (i.e. not just for the entire weblogic server but for individual sever instances).
              thanks
              Will

    WLS 9.2 includes pretty advanced features in this area. Both deployment plans and application libraries could be used. There's also a domain/lib directory where jar files can be placed and are visible throughout the server instance.
              Unfortunately 8.1 has none of these features. In 8.1, your choices are to either add these into the $CLASSPATH, or package them in the application.
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Weblogic Classpath setting error not able to pick the properties file

    Hi All,
    We are using a third party jar and create a java Web service on the top of that jar. This jar file need two configuration file .properties and .xml when we deploy war for the application into weblogic server it will give file not found error. Though this file already exists inside the .war but from the application it is not able to pick the files.
    We find that these file need to be put in weblogic domain home and we put it there and application works.
    I decompile the jar and found that inside java class they use FileReader("allXXX.xml") path and when I Google it and found that it will pick the file from weblogic domain directory.
    The issue is that we need to put properties file in specific weblogic folder like /3party/config by setting the class path inside startWebLogic.cmd. Please let us know solution for same
    Thanks in advance
    Edited by: sb**** on Mar 19, 2012 9:08 AM

    Hi , I am also facing the similer issue. I am deploying war file of my Spring MVC application , but its not picking resource bundle .properties files from one of the configuration file.
    <bean id="PropertiesRepository"
              class="LanguageBasedPropertiesRepository">
              <property name="propertiesFiles">
                   <map>
                        <entry key="en" value="classpath:/exceptionMessages.properties" />
                        <entry key="es" value="classpath:/exceptionMessages_es.properties" />
                        <entry key="default" value="classpath:/exceptionMessages.properties" />
                   </map>
              </property>
         </bean>
    Please let me know how we can modify this to make it work.
    thanks .

Maybe you are looking for

  • 23" cinema (clear) have an IPS panel?

    My aging 23" cinema display (purchased in 2000, if I recall) is having brightness problems and I'm looking to replace it and wondering if I'll be happy with an inexpensive monitor. The 23" cinema has an IPS panel in it, right? A newer inexpensive mon

  • Bank and company code

    hi all, Can someone please tell me how to find out which bank from table bnka belongs to which company code, Regards, Tarun Bahal

  • Infoset using standard cubes

    Hi Experts We are currently using BW 3.5. Help.sap.com say that it is possible to use an cube in an infoset. In my system I do not get that possibility. Is the documentation wrong or do I need a support package or something? Kind regards Erik

  • Lynx k3011 will not startup

    when i try to start my tablet it does nothing!  the green led next to the camera used to flash once when the power button was pushed.  it would then boot up normally.  now when i push the power button the green led comes on and stays on, but the unit

  • Will my phone become unable to view chinese word a...

    i have a nokia c3-01 and current version is 5.6,newest one is 6.0,last time i upgrade my other phone and its become unable to view chinese word,but last time i upgrade using connect to com method,now i wanna update my phone using the software update