<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sheila&#039;s Blog &#187; jboss</title>
	<atom:link href="http://sheilapollard.com/tag/jboss/feed/" rel="self" type="application/rss+xml" />
	<link>http://sheilapollard.com</link>
	<description>Software Development</description>
	<lastBuildDate>Wed, 24 Mar 2010 17:19:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Chainsaw to tail your JBoss server log</title>
		<link>http://sheilapollard.com/2009/04/07/using-chainsaw-to-tail-your-jboss-server-log/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/04/07/using-chainsaw-to-tail-your-jboss-server-log/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:06:21 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chainsaw]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[log4j]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=271</guid>
		<description><![CDATA[Log4j is a logging library from Apache.  It consists of loggers (log events) and appenders (a destination for a log message).  There&#8217;s always a rootLogger defined, plus however many other loggers you require.  A logger can have several appenders attached to it which can format and write the message to the console or a file [...]]]></description>
			<content:encoded><![CDATA[<p>Log4j is a logging library from Apache.  It consists of loggers (log events) and appenders (a destination for a log message).  There&#8217;s always a rootLogger defined, plus however many other loggers you require.  A logger can have several appenders attached to it which can format and write the message to the console or a file etc.  The logging levels are TRACE, DEBUG, INFO, WARN, ERROR and FATAL.</p>
<p>A default JBoss installation uses log4j for logging.  The log4j settings are configured in JBOSS_HOME\server\default\conf\jboss-log4j.xml which sends output to both the console and JBOSS_HOME\server\default\log\server.log</p>
<p><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xvZ2dpbmcuYXBhY2hlLm9yZy9jaGFpbnNhdw==" target=\"_blank\">Chainsaw</a> is a GUI tool for parsing and analysing log files generated by log4j.  It allows you to read and filter events.  It can be used to tail the server.log file allowing you to filter the messages you see rather than searching through the log file in an editor.</p>
<p>You can download Chainsaw from <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL2xvZ2dpbmcuYXBhY2hlLm9yZy9jaGFpbnNhdy9kb3dubG9hZC5odG1s" target=\"_blank\">here</a>.</p>
<p>Download the chainsawWebStart.jnlp file and open it up to start the Chainsaw Log viewer.</p>
<p><strong>Tailing a Log file</strong><br />
Create a file somewhere on your system to hold configuration information for chainsaw.</p>
<p>chainsaw-config.xml
<code>&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"&gt;

  &lt;plugin name="jboss" class="org.apache.log4j.varia.LogFilePatternReceiver"&gt;

    &lt;param name="fileURL" value="file:///c:/Applications/jboss-4.2.2.GA/server/default/log/server.log" /&gt;
    &lt;param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/&gt;
    &lt;param name="logFormat" value="TIMESTAMP LEVEL [LOGGER] MESSAGE"/&gt;
  &lt;param name="name" value="alpha-jboss" /&gt;
  &lt;param name="tailing" value="true" /&gt;
  &lt;/plugin&gt;

  &lt;root&gt;
    &lt;level value="debug"/&gt;
   &lt;root&gt;

&lt;/log4j:configuration&gt;</code></p>
<p>Edit the filename to match where the jboss server.log is on your system.</p>
<p>Select the &#8216;view-show application wide preferences&#8217; menu.</p>
<p>In the automatic configuration url field, enter the URL to your config file.<code&gt;file:///c:/chainsaw-config.xml&lt;/code><br />
Select OK and restart Chainsaw.</p>
<p>You'll see the file load up ina new tab 'file/c:Applications/jboss-4.2.2.GA/server/default/log/server.log.</p>
<p>There's a dropdown menu that lets you filter the log entries from the most verbose TRACE up to FATAL errors only.</p>
<p><strong>Chainsaw basics:</strong><br />
The toolbar icons at the top let you pause the logging, configure what gets displayed and clear the screen of events among other things.  The first thing to get accustomed to is drilling through the log events to see the information you're interested in.  In the left pane you can move through the logging tree to select a particular logger.  Any messages from a Logger matching the one selected are highlighted in black.  You can then right click on the selected logger in the tree and choose either 'Focus on' to filter to just those events or 'Ignore' to exclude them.  Selecting a specific event gives you more detailed information in the lower pane.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0yNzEjY29tbWVudHM=" title=\"Comments on &quot;Using Chainsaw to tail your JBoss server log&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?271" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=271" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/04/07/using-chainsaw-to-tail-your-jboss-server-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco Part Two &#8211; Deploying Alfresco on JBoss</title>
		<link>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:30:33 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[alfresco]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=100</guid>
		<description><![CDATA[Steps for deploying Alfresco on a JBoss server.]]></description>
			<content:encoded><![CDATA[<p>First we need to get the war version of alfresco from a download site.   The one I used was alfresco-labs-war-3Stable.zip.  Extract the contents to a temporary folder.</p>
<p>The next step is to set up the database.   If you&#8217;ve already installed the default version of Alfresco you&#8217;ll need to drop the database and recreate it.  Either way, you&#8217;ll find mysql scripts in extra/databases/mysql for setting up or dropping the schema.    See <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDMvMTYvYWxmcmVzY28tcGFydC1vbmUtdXNpbmctYWxmcmVzY28tZm9yLWRvY3VtZW50LW1hbmFnZW1lbnQvP3V0bV9jYW1wYWlnbj1mZWVkJnV0bV9tZWRpdW09ZmVlZCZ1dG1fc291cmNlPWJsb2c=">Using Alfresco for document management Part One</a> for details on how to do a default install of Alfresco and for configuring Open Office.</p>
<p>You now need to extract alfresco.war to edit the contents.  I expanded it into exploded/alfresco.war so I can copy the alfresco.war folder directly into my jboss application when I&#8217;m ready to deploy.</p>
<p>We need to configure the war for deployment in JBoss.  You&#8217;ll find the config files needed in the extensions/extension folder.  The ones we want are:<br />
custom-hibernate-dialect.properties<br />
custom-repository.properties<br />
custom-repository-context.xml</p>
<p>Copy these to exploded/alfresco.war/WEB-INF/classes/alfresco/extension</p>
<p>In custom-repository.properties you need to set the dir.root to point to where you want to store your alfresco data.  Also uncomment and set the database values &#8211; don&#8217;t forget to disable the derby settings also.</p>
<p>Finally you need to set the external executable locations.  What I did here was copy the ImageMagick and bin folders from the default Alfresco install into my root folder containing alf_data.   Otherwise you will need to install missing executables yourself.</p>
<p>custom-repository.properties:
<code>dir.root=C:/Alfresco/alf_data

db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100

ooo.exe=C:/Program Files/OpenOffice.org 3/program/soffice
ooo.user=${dir.root}/oouser
img.root=C:/Alfresco/ImageMagick
swf.exe=C:/Alfresco/bin/pdf2swf

db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco</code></p>
<p>Now update the hibernate dialect in custom-hibernate-dialect.properties<code&gt;# MySQL dialect (default) hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect&lt;/code></p>
<p>I used JBoss 4.2.2 as my application server.  Before deploying you should edit jboss-4.2.2.GA/server/default/deploy/ejb3.deployer/META-INF/persistence.properties to change hibernate.bytecode.provider from javassist to cglib.<code&gt;hibernate.bytecode.provider=cglib&lt;/code></p>
<p>To avoid getting permgen out of memory errors you will probably need to configure your JBOSS_HOME/bin/run.bat to increase the memory size.<code&gt;set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512&lt;/code></p>
<p>You can now try coping alfresco.war into your jboss application.  Assuming this doesn't cause a spectacular display of stack traces, when the server finally starts up you can try accessing the application at http://localhost:8080/alfresco.</p>
<p>You're now ready to start figuring out how to use alfresco as it is, or integrate it with other applications.</p>
<p>Next - <a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQuY29tLzIwMDkvMDMvMTkvYWxmcmVzY28tcGFydC10aHJlZS1jcmVhdGUtYS1uZXctd29ya3NwYWNlLXVzaW5nLWEtd2ViLXNlcnZpY2UtY2FsbC8/dXRtX2NhbXBhaWduPWZlZWQmdXRtX21lZGl1bT1mZWVkJnV0bV9zb3VyY2U9YmxvZw==">Creating a workspace using a web service API</a></p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0xMDAjY29tbWVudHM=" title=\"Comments on &quot;Alfresco Part Two &#8211; Deploying Alfresco on JBoss&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?100" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=100" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/18/alfresco-part-two-deploying-alfresco-on-jboss/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Serving static external content in JBoss</title>
		<link>http://sheilapollard.com/2009/03/10/serving-static-external-content-in-jboss/?utm_campaign=feed&utm_medium=feed&utm_source=blog</link>
		<comments>http://sheilapollard.com/2009/03/10/serving-static-external-content-in-jboss/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 11:47:56 +0000</pubDate>
		<dc:creator>Sheila</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://sheilapollard.wordpress.com/?p=14</guid>
		<description><![CDATA[To serve external static content in JBoss you need to add a Context element mapping the url eg. /application/test_data to the external folder as follows:
Edit /server/default/deploy/jbossweb-tomcat50.sar/server.xml and add a Context element just under the host tag.
&#60;host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"&#62;

&#60;Context path="/app/test_data" appBase=""
docBase="C:/test_data"
debug="99" reloadable="true"&#62;
&#60;/Context&#62;
Replace C:/test_data with the path to the folder on the server.
Redeploy the application to [...]]]></description>
			<content:encoded><![CDATA[<p>To serve external static content in JBoss you need to add a Context element mapping the url eg. /application/test_data to the external folder as follows:</p>
<p>Edit /server/default/deploy/jbossweb-tomcat50.sar/server.xml and add a Context element just under the host tag.
<code>&lt;host name="localhost"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"&gt;

&lt;Context path="/app/test_data" appBase=""
docBase="C:/test_data"
debug="99" reloadable="true"&gt;
&lt;/Context&gt;</code></p>
<p>Replace C:/test_data with the path to the folder on the server.</p>
<p>Redeploy the application to make sure that the config change has been picked up and then test that the files can be accessed.</p>
<p>Note: this content will be accessible without logging into the application if the url is known.</p>
<br /><a href="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?url=aHR0cDovL3NoZWlsYXBvbGxhcmQud29yZHByZXNzLmNvbS8/cD0xNCNjb21tZW50cw==" title=\"Comments on &quot;Serving static external content in JBoss&quot;\"><img src="http://sheilapollard.com/wp-content/plugins/feed-comments-number/image.php?14" alt="Comments" /></a> <img src="http://sheilapollard.com/wp-content/plugins/feed-statistics.php?view=1&post_id=14" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://sheilapollard.com/2009/03/10/serving-static-external-content-in-jboss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
