The Source for Java Technology Collaboration
User: Password:



Bhakti Mehta

Bhakti Mehta's Blog

Woodstox in Glassfish v2

Posted by bhaktimehta on June 01, 2007 at 11:07 AM | Comments (1)


Starting with GF v2 b49, Woodstox is now integrated as part of Glassfish along with sjsxp so that users have the benefit of additional performance improvements which woodstox provides.
sjsxp is the default parser in glassfish. This is a preliminary integration with Woodstox and testing is still in progress so let us know if you run into issues.
Here is some more information from Santiago regarding Woodstox in his blog Woodstox rocks Glassfish v2

To enable Woodstox we need to use the following

Client side

These three system properties will need to be added on client side when you want to enable Woodstox.
-Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
-Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory
-Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory



Server side

Similarly on server side we can use standard JAXP API's system properties to turn Woodstox on for entire GF. So GF process needs to be execed with the following system properties:

-Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
-Djavax.xml.stream.XMLOutputFactory=com.ctc.wstx.stax.WstxOutputFactory
-Djavax.xml.stream.XMLEventFactory=com.ctc.wstx.stax.WstxEventFactory

In glassfish, the admin console provides easy way to set system properties as show in Fig 1 (you can do the same by editing domain.xml)


admin-console-sys-props.jpg

Fig 1  Modifying system properties using admin console http://localhost:4848

You can try it out and give us feedback at
dev@wsit.dev.java.net
dev@glassfish.dev.java.net



Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Great blog. One comment. Editing domain.xml is not recommended, instead use 'asadmin create-system-properties'

    Posted by: pa100654 on June 02, 2007 at 01:55 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds