Setting System Property for Weblogic


General J2EE: Setting System Property for Weblogic

  1. Setting System Property for Weblogic (3 messages)

    I have a class that is called on Weblogic startup. The class creates a connection pool, but the connection input paramateres are read from an XML file by a predefined class that reads the system property to find the location of the XML file. How can I set this in file?

  2. Wow it seems as though you are jumping through hopes to do what weblogic already offers you. I assume since you are using you are using 5.1 of weblogic. Why wouldn't you just define the connection pool in the file instead of using a seperate XML file? It seems to me that the only thing you are trying to do is allow someone to edit a seperate XML file for configuring a connection pool, but all this can be accomplished within the file. You also may want to look at weblogic 6.0 the config files are much more straigh forward.

    Oh two answer your question, weblogic provides a class to read the properties file, you have dig around on their doc site, but you can find out how to do it.

  3. Weblogic provides the property for specifing connection pool the code for it is

    # url=jdbc:cloudscape:demo,\
    # driver=COM.cloudscape.core.JDBCDriver,\
    # initialCapacity=1,\
    # maxCapacity=2,\
    # capacityIncrement=1,\
    # props=user=none;password=none;server=none
    # Add a TXDataSource for the connection pool:
    # Add an ACL for the connection pool:

  4. I agree that you seem to be jumping through hoops, but in order to answer your immediate question...

    I believe WL5.1.0 will ignore parameters it doesn't recognize when loading the VM, but try it and see.

    Otherwise, edit the startup script you are using for weblogic to add the -D parameter to the call to the java / jre command.

    Of course, if you are using wlserver.exe then you will need to look at the commands for wlconfig which are there to let you stuff this stuff in the registry under NT.

    That answer your question?