Arch2Arch Tab BEA.com
Syndicate this blog (XML)

Visualize WebLogic's config.xml

Bookmark Blog Post

del.icio.us del.icio.us
Digg Digg
DZone DZone
Furl Furl
Reddit Reddit

Eugene Kuleshov's Blog | April 27, 2005  11:15 AM | Comments (3)


All configuration parameters of the WebLogic server are stored to single config.xml file saved in the domain directory. This config file is a primary source of information about all configuration parameters including JDBC connection pools, JMS, JTA, logging, clustering, deployed application, etc.

Note that reference documentation does not recommend editing config.xml directly!

The good thing about config.xml is that it can be viewed in any text editor. For example:

<?xml version="1.0" encoding="UTF-8"?>
<Domain ConfigurationVersion="8.1.3.0" Name="mydomain">
    <Server ExpectedToRun="false" JMSThreadPoolSize="10"
        ListenAddress="" ListenPort="7001" Name="myserver"
        NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy"
        ServerVersion="8.1.3.0" StdoutDebugEnabled="true" StdoutSeverityLevel="64">
...
    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
        InitialCapacity="1" MaxCapacity="10" Name="wliBackupPool"
        Password="{3DES}lU/aklIfTfKSok8gf4WpNg=="
        PreparedStatementCacheSize="300"
...

From the above config fragment you can see that JDBC connection pool with name wliBackupPool is using non-XA JDBC driver oracle.jdbc.driver.OracleDriver.

Unfortunately, for a heavily customized server that has several applications deployed, config.xml could be very large and browsing it without a special tool or XML-aware editor is no fun at all. However it is still the fastest way to verify server configuration.

One of the possible solutions to this issue is to transform config.xml to more readable document. There are lot of different tools can be used to do that and most of them will require special configuration. From other hand, these days pretty much any workstation has web browser and most if not all of them can apply XSL and CSS document transformations on the fly. You can specify stylesheet location using special processing instruction in XML document and browser will use that stylesheet to transform data before rendering it on the screen. For example:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl"
   href="http://dev2dev.bea.com/blog/euxx/config.xsl"?>
<Domain ConfigurationVersion="8.1.3.0" Name="mydomain"?>
  <Server ExpectedToRun="false" JMSThreadPoolSize="10"
...

I've prepared a simple XSL transformation that shows structure of the config.xml. After adding above instruction to config.xml it can be opened in a web browser.

config.gif

Another handy thing is that for every config element there is a link to an appropriate place in the WebLogic Server Configuration Reference.


Comments

Comments are listed in date ascending order (oldest first) | Post Comment

  • Hi, It's a really nice stuff. Now no need to keep searching for required fields in the config.xml. Thanx.

    Posted by: ss_suryawanshi on May 3, 2005 at 10:58 PM

  • Hi This is a great stuff... you have informed us... but it does not seems to work with 9.2 version, can you please check with the 9.2 version of BEA WebLogic server Thank you

    Posted by: shailesh.dyade on April 5, 2007 at 6:44 AM

  • I am not using WebLogic anymore for my work. Since it is just XSL stylesheet, it should be easy enough for you to fix it for WLS 9 yourself.

    Posted by: euxx on April 22, 2007 at 8:43 AM



Only logged in users may post comments. Login Here.

Powered by
Movable Type 3.31