<?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>Alexander Holbreich&#187; JBoss</title> <atom:link href="http://alexander.holbreich.org/category/software/jboss/feed/" rel="self" type="application/rss+xml" /><link>http://alexander.holbreich.org</link> <description>Everything becomes a little different as soon as it is spoken out loud.  ~Hermann Hesse</description> <lastBuildDate>Wed, 01 Feb 2012 22:44:21 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Jboss 7 setup on debian linux</title><link>http://alexander.holbreich.org/2011/11/jboss-7-setup-linux/</link> <comments>http://alexander.holbreich.org/2011/11/jboss-7-setup-linux/#comments</comments> <pubDate>Thu, 10 Nov 2011 20:29:33 +0000</pubDate> <dc:creator>shuron</dc:creator> <category><![CDATA[JBoss]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[Personal]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[init.d]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[setup]]></category><guid isPermaLink="false">http://alexander.holbreich.org/?p=981</guid> <description><![CDATA[This is a short step by step explanation of the setup of JBoss 7.0.2 on your Linux (explicit debian). Nowadays there is still no official Debian package for JBoss 7 out there, so we have to do a couple of steps manually.  First i describe how to download and to prepare the jboss. Secondly we [...]]]></description> <content:encoded><![CDATA[<p><a href="http://alexander.holbreich.org/wp-content/uploads/2011/11/as7_logo.png?4c9b33"><img class="alignright size-full wp-image-1012" title="jboss7_logo" src="http://alexander.holbreich.org/wp-content/uploads/2011/11/as7_logo.png?4c9b33" alt="" width="128" height="150" /></a>This is a short step by step explanation of the setup of JBoss 7.0.2 on your Linux (explicit debian). Nowadays there is still no official Debian package for JBoss 7 out there, so we have to do a couple of steps manually.  First i describe how to download and to prepare the jboss. Secondly we do some basic configuration that you&#8217;ll be needed and at the end i will show you one of the ways to register JBoss as a service.</p><h3>1. download and prepare.</h3><p>Start by download  currently available version (7.0.2) of the JBoss 7.</p><pre class="brush: bash; title: ; notranslate">
#Web Profile version download.
wget http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-web-7.0.2.Final.tar.gz
</pre><p>Extracting files to the final location <a title="Extracting tar, gzip, bzip2, z" href="http://alexander.holbreich.org/2009/02/tar-gzip/">using tar</a>.</p><p><span id="more-981"></span><pre class="brush: bash; title: ; notranslate">
&lt;pre&gt;tar zxvf jboss-as-web-7.0.2.Final.tar.gz -C /usr/local/
</pre><p>Now your JBoss 7 is placed inside /usr/local/jboss-as-web-7.0.2.Final/.I dont&#8217;t like that name.  It&#8217;s just cosmetics, but i prefer to rename the last part ot the path.</p><pre class="brush: bash; title: ; notranslate">
cd /usr/local/
mv jboss-as-web-7.0.2.Final/ jboss-7.0.2
</pre><p>Now important things. Some basic security and right management. I suppose  you don&#8217;t want to start your JBoss with root rights.<br /> Therefore we need to create new user and new group named  <em>jboss</em>. Make them owner of your JBoss stuff.</p><pre class="brush: bash; title: ; notranslate">
addgroup jboss
useradd -g jboss jboss
chown -R jboss:jboss /usr/local/jboss-7.0.2/
</pre><p>Your jboss 7 is almost installed now.</p><h3>2. Configuration and first test.</h3><p>Start your brand new  Jboss 7 server with:</p><pre class="brush: bash; title: ; notranslate">
sudo -u jboss sh /usr/local/jboss-7.0.2/bin/standalone.sh &amp;
</pre><p>Now it  is testable on your local machine with <em>http://localhost:8080.</em><br /> <strong>But!</strong> maybe you trying to install that jboss on remote machine and want to access this installation remotely. I that case you need to enable remote interface of your JBoss. I assume we start by standalone configuration, so  you have to edit <em>/usr/local/jboss-7.0.2/standalone/configuration/standalone.xml</em> file. The easiest way is to  find <em>&lt;interfaces&gt;</em> section and replace the 127.0.0.1 address with <em>&lt;any-address/&gt;</em></p><pre class="brush: xml; title: ; notranslate">
&lt;interfaces&gt;
   &lt;interface name=&quot;management&quot;&gt;
     &lt;any-address/&gt;
     &lt;/interface&gt;
   &lt;interface name=&quot;public&quot;&gt;
    &lt;any-address/&gt;
   &lt;/interface&gt;
 &lt;/interfaces&gt;
</pre><p>Beware with this configuration you expose also the management console to the public. The console is bounded to interface named=&#8221;management&#8221; by default.  In production environments you have to put more attention to this. but now you can access your jboss from anywhere.</p><h3>3. Jboss as Service</h3><p>Now we have a basic configured JBoss, but i want to maintain it as a service. Unfortunately Jboss archive has no predefined <em>init.d</em> scripts, so i have to to it on my own. But this is not a big problem, just straightforward following some Debian conventions and useful scripts.</p><p>Ok, let&#8217;s create jboss maintenance script.</p><pre class="brush: bash; title: ; notranslate">
touch /etc/init.d/jboss
chmod 755 /etc/init.d/jboss
</pre><p>Ready! Now put following inside.</p><pre class="brush: bash; title: ; notranslate">
#!/bin/sh
### BEGIN INIT INFO
# Provides: jboss
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Management of JBoss AS v7.x
### END INIT INFO

#Defining JBOSS_HOME
JBOSS_HOME=/usr/local/jboss-7.0.2

case &quot;$1&quot; in
start)
echo &quot;Starting JBoss AS7...&quot;
sudo -u jboss sh ${JBOSS_HOME}/bin/standalone.sh &amp;
;;
stop)
echo &quot;Stopping JBoss AS7...&quot;
sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-admin.sh --connect command=:shutdown
;;
log)
echo &quot;Showing server.log...&quot;
tail -1000f ${JBOSS_HOME}/standalone/log/server.log
;;
*)
echo &quot;Usage: /etc/init.d/jboss {start|stop|log}&quot;
exit 1
;; esac
exit 0
</pre><p>This file is ready to use. You can use it self for manual start and stop of your jboss, you also can follow the server.log by using &#8220;log&#8221; parameter.<br /> But let&#8217;s make it to the end, as an automatic starting service. It&#8217;s easy with update-rc.d script:</p><pre class="brush: bash; title: ; notranslate">
update-rc.d jboss defaults
</pre><p>Now your ready and your JBoss will be shutdown on machine shutdown and it should start on machine start-up.</p><p>Of course this is not the only way to start using JBoss 7. Your ideas are welcome!</p> ]]></content:encoded> <wfw:commentRss>http://alexander.holbreich.org/2011/11/jboss-7-setup-linux/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Java WebServices JSR overview</title><link>http://alexander.holbreich.org/2010/10/java-webservices-jsrs-overview/</link> <comments>http://alexander.holbreich.org/2010/10/java-webservices-jsrs-overview/#comments</comments> <pubDate>Wed, 20 Oct 2010 22:51:12 +0000</pubDate> <dc:creator>shuron</dc:creator> <category><![CDATA[JBoss]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Software Engineering & Architecture]]></category> <category><![CDATA[community]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[JAX-RS]]></category> <category><![CDATA[JAX-WS]]></category> <category><![CDATA[jcp]]></category> <category><![CDATA[jee]]></category> <category><![CDATA[JSR]]></category> <category><![CDATA[JSR-224]]></category> <category><![CDATA[JSR-311]]></category><guid isPermaLink="false">http://alexander.holbreich.org/?p=596</guid> <description><![CDATA[Here give a short overview of important JSR of Java Community Process which define and standardises  WebServices development on Java Platform. JSR-175: A Metadata Facility for the JavaTMTM Programming Language. Also known as Java Annotations e.g. @Deprecated or @Override. JSR-181: Web ServiceMetadatata for the Java Platform. This is just a set of Annotations for using [...]]]></description> <content:encoded><![CDATA[<p><a href="http://alexander.holbreich.org/wp-content/uploads/2010/10/jcp.gif?4c9b33"><img class="size-full wp-image-600 alignright" style="margin: 10px;" title="jcp" src="http://alexander.holbreich.org/wp-content/uploads/2010/10/jcp.gif?4c9b33" alt="Java community process" width="112" height="59" /></a>Here give a short overview of important JSR of Java Community Process which define and standardises  WebServices development on Java Platform.</p><ul><li><a href="http://jcp.org/en/jsr/detail?id=175" target="_blank">JSR-175</a>: <em>A Metadata Facility for the JavaTM<sup>TM</sup> Programming Language</em>. Also known as Java Annotations e.g. @Deprecated or @Override.</li><li><a href="http://jcp.org/en/jsr/detail?id=181" target="_blank">JSR-181</a>: <em>Web ServiceMetadatata for the Java Platform. </em>This is just a set of Annotations for using with JAX-WS WebServiceses. Think of  Annotations @WebService, @WebMethod&#8230;</li><li><a href="http://jcp.org/en/jsr/detail?id=101">JSR-101</a>: <em>API for XML-based RPC: JAX-RPC 1.1. </em>Definiton of RCP call with SOAP Messages, Type Mapping between Java  and XML.<em><br /> </em></li><li><a href="http://jcp.org/en/jsr/detail?id=109" target="_blank">JSR-109:</a><em> Implementing Enterprise Web Services Definiton</em> of WebsServices based on JAX-RPC which is now accessed by JAX-WS. That early standard defined WebServiceses for J2EE 1.4. It enabled implementation of Web-Serviceses as Endpoints over Enterprise Session Bean&#8217;s (EJB 2 generation with awful  XML descriptors).</li><li><a href="http://jcp.org/en/jsr/detail?id=183" target="_blank">JSR 183</a>: <em>Web Services Message Security APIs<br /> </em></li><li><a href="http://jcp.org/en/jsr/detail?id=224" target="_blank">JSR-224:</a> <strong><em>The Java API for XML-Based Web Services (JAX-WS) 2.2</em></strong><ul><li>Final Release 05.2006 (Version 2.0 JEE 5) ,Last Maintenance 12.200Verisonon (2.2 JEE 6).</li><li>Current state of the art</li><li>Relies on its own Architecture for XML Binding <a href="http://jcp.org/en/jsr/detail?id=222" target="_blank">JSR -222</a></li><li>Of course supports Annotations JSR -181</li><li>Implementations: <a href="http://cxf.apache.org/">Apache CXF</a>, <a href="http://www.jboss.org/jbossws" target="_blank">JBoss WS</a>, <a href="https://jax-ws.dev.java.net/" target="_blank">JAX-WS</a> as Sun&#8217;s Ref. Implementation</li></ul></li><li><a href="http://jcp.org/en/jsr/detail?id=311" target="_blank">JSR-311</a>: <strong><em>JAX-RS: Java <sup>TM</sup> API RESTful Web Services</em></strong><ul><li>Final Release 10.2008</li><li>Part of JEE 6</li><li>AlWeb Servicesvices of REST Style jusPOJOsPOJOs</li><li>Mseen ssen such typical Annotations like: @Path , @GET，@PUT, @POST，@DELETE</li><li>Implementations: <a href="http://cxf.apache.org/">Apache CXF</a>, <a href="http://incubator.apache.org/wink/" target="_blank">Apache Wink</a>, <a href="http://www.jboss.org/resteasy" target="_blank">Resteasy</a> as part of JBoss/Tomcat,   <a href="https://jersey.dev.java.net/">Jersey</a> &#8211; Sun&#8217;s Ref. implementation.</li></ul></li></ul><p>Did I forgot something?</p> ]]></content:encoded> <wfw:commentRss>http://alexander.holbreich.org/2010/10/java-webservices-jsrs-overview/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>JBoss 5 GA on Debian linux</title><link>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/</link> <comments>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/#comments</comments> <pubDate>Tue, 26 Jan 2010 23:50:05 +0000</pubDate> <dc:creator>shuron</dc:creator> <category><![CDATA[JBoss]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[application server]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[script]]></category><guid isPermaLink="false">http://alexander.holbreich.org?p=31</guid> <description><![CDATA[This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x &#8220;Lenny&#8221; ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard  file system hierarchy. Also init.d. scripts configuration is given here. Installing Java SDK Nowadays  installing [...]]]></description> <content:encoded><![CDATA[<p>This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x &#8220;Lenny&#8221; ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard  file system hierarchy. Also init.d. scripts configuration is given here.</p><h2>Installing Java SDK</h2><p>Nowadays  installing Java environment on Debian is an easy task. I used JDK 1.6. Don&#8217;t confound JDK with JRE, because bare Java Runtime Environment is not enough for running JBoss. Debian Wiki maintains (hope) a<a href="http://wiki.debian.org/Java" target="_blank"> list of available java .deb packages</a>, which are easily can be installed with your preferred way. I prefer <em>aptitude</em>, but <em>apt-get</em> of course works too.</p><pre class="brush: bash; title: ; notranslate">
$ aptitude install sun-java6-jdk
#or by good old apt-get.
$ apt-get install sun-java6-jdk
</pre><p>Installation is done after seconds. Now test your java installation with</p><pre class="brush: bash; title: ; notranslate">
$ java -version
# Here example result on my configuration:

java version &quot;1.6.0_12&quot;
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
</pre><p>If you get something like this, you&#8217;re done and your java should be already in the PATH.</p><h2>Installing JBoss AS</h2><p>Now let&#8217;s install  JBoss Application Server.</p><h3>Preparing</h3><p><a href="http://alexander.holbreich.org/wp-content/uploads/2010/01/openlogo-nd-50.png?4c9b33"><img class="alignleft size-full wp-image-500" style="margin-left: 15px; margin-right: 15px;" title="openlogo-nd-debian" src="http://alexander.holbreich.org/wp-content/uploads/2010/01/openlogo-nd-50.png?4c9b33" alt="" width="50" height="61" /></a>Normally you are not willing  to start services (especially when they are accessed from outher machines) with root privileges. Therefore we have to define new user and group which will be used to manage JBoss.  So next line will create new group and new user with this group.</p><pre class="brush: bash; title: ; notranslate">
 $ groupadd jboss
 $ useradd -s /bin/bash -d /home/jboss -m -g jboss jboss
</pre><p>This jboss user has no password, so nobody can login with this username. If you consider to  login with jboss user,  password has to be set. Use <em>passwd jboss</em> command for that.</p><h3>Download, Installation,  filesystem layout</h3><p>Now  download desired Jboss version. I started with JBoss 5.1.0 GA, which can be download with:</p><pre class="brush: bash; title: ; notranslate">
$ cd /tmp # swithch to temp dir
$ wget http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip/download
</pre><p>Check also the whole <a href="http://labs.jboss.com/jbossas/downloads/" target="_blank">list of verisons</a> if interested. As you may noticed JBoss binaries are packaged with ZIP. So it is comfortable to use<em> unzip</em> tool. Maybe you have to install it first.</p><p>But before you extract  downloaded file, we have to decide, where exactly should JBoss files be placed on a  file-system. Unfortunately JBoss is not quite conform to Linux <a href="http://proton.pathname.com/fhs/pub/fhs-2.3.html" target="_blank">File System Hierarchy Standard</a> per default, so there are many possibilities for a location configuration. Some of you may want to place JBoss  into <em>/opt</em> directory. But I prefer to split the installation a little bit and  want to start by putting  JBoss core files in <em>/usr/local/,</em> where local, unchangeable and read-only files usually placed. E.g. I use  /usr/local/jboss/510 as JBoss 5.1.0 GA root.  So let&#8217;s create that location and extract files into it.</p><pre class="brush: bash; title: ; notranslate">
mkdir /usr/local/jboss #create new jboss directroy
chown jboss:jboss /usr/local/jboss #now its belongs touser jboss and group jboss
su jboss
mkdir /usr/local/jboss/510
cd /usr/local/jboss/510
unzip /tmp/jboss-5.1.0.GA.zip
</pre><p>At this moment you should have new working JBoss. If you want, test it with</p><pre class="brush: bash; title: ; notranslate">
bin/run.sh -b 0.0.0.0
</pre><p>Where<em> -b 0.0.0.0 </em>means that JBoss is listening for every ip address of current machine.</p><p>However at this stage the installed Jboss still brakes the  Linux Filesystem Hierarchy Standard, so let&#8217;s improve this situation.</p><p><span id="more-31"></span>After the first start of the server used configuration will have new directories <em>/tmp</em> and <em>/work</em> . The /tmp directory contain the temporarily state of the deployed applications and /work is contains compiled jsp pages of deployed applications. Therefore both directories are of temporal character and  should be on more appropriate place according to Linux standards.</p><p>I use only a default JBoss configuration,  which is defined under <em>&lt;jboss_root&gt;/server/default</em>, so I need to do further changes only for this configuration. My decision is to put both directories to /var /tmp/jboss.:</p><pre class="brush: bash; title: ; notranslate">
$ mkdir /var/tmp/jboss
$ chown jboss:jboss /var/tmp/jboss/
$ su jboss
$ mkdir /var/tmp/jboss/510
$ mkdir /var/tmp/jboss/510/tmp # creating alternavtive location for tmp
$ mkdir /var/tmp/jboss/510/work # creating alternavtive location for work
$ cd /usr/local/jboss/510/server/default # switch to configuration directory if not allready here.
$ rm -R tmp # delete existing tmp directory (server should not run at this moment)
$ rm -R work # delete existing work directory
$ ln -s /var/tmp/jboss/510/tmp ./tmp # Finaly create symbolic link to new place$
$ ln -s /var/tmp/jboss/510/work ./work # Finaly create symbolic link to new place
</pre><p>repeat the same for /log directory. It is common to have logs at one place in /var/log<br /> create a log directory tree e.g. /var/log/jboss/510/ and let log link to it as was shown for tmp and work directories.</p><p>After that your configuration directory should look like:</p><pre class="brush: bash; title: ; notranslate">
$ ls -l /usr/local/jboss/510/server/default
drwxr-xr-x  6 jboss jboss 4096 22. Mai 2009  conf
drwxr-xr-x  6 jboss jboss 4096 23. Jan 00:10 data
drwxr-xr-x 15 jboss jboss 4096 22. Mai 2009  deploy
drwxr-xr-x 12 jboss jboss 4096 22. Mai 2009  deployers
drwxr-xr-x  2 jboss jboss 4096 22. Mai 2009  lib
lrwxrwxrwx  1 jboss jboss   19 23. Jan 01:07 log -&gt; /var/log/jboss/510/
lrwxrwxrwx  1 jboss jboss   23 23. Jan 01:13 tmp -&gt; /var/tmp/jboss/510/tmp/
lrwxrwxrwx  1 jboss jboss   24 23. Jan 01:13 work -&gt; /var/tmp/jboss/510/work/
</pre><p>And your logs are of course accessible directly at new location e.g.</p><pre class="brush: bash; title: ; notranslate">
tail -1000f /var/log/jboss/510/server.log
</pre><p>Furthermore you should deploy your applications to /srv/jboss/510 to enable this location for automatically scan and deployment,just create a link from /default/deploy/. Call it e.g. applications.:</p><pre class="brush: bash; title: ; notranslate">
$ ln -s /srv/jboss/510 ./usr/local/jboss/510/server/default/deploy/applications #
</pre><p>So applications which are placed to /srv/jboss/510 will be automatically deployed on the server.</p><h3>Start JBoss on boot</h3><p>First of all you need a life-cycle management script used by <em>init</em>. Jboss already provides some of then.  Let&#8217;s use one of Red Hat default script by adopting it a little bit. First of all copy the script to common place (feel free to ad version ti scriptname if you need or like)</p><pre class="brush: bash; title: ; notranslate">
$ cp /usr/local/jboss/bin/jboss_init_redhat.sh /etc/init.d/jboss
</pre><p>If you want to access you fresh JBoss also from other IP addresses you need to change<br /> JBOSS_HOST line according to:</p><pre class="brush: bash; title: ; notranslate">
JBOSS_BIND_ADDR=${JBOSS_HOST:-&quot;-b 0.0.0.0&quot;}.
</pre><p>0.0.0.0. binds it on all IP addresses. Consider to change also other param this file to mach your personal needs. Now you can automatically create all the symbolic links used by <em>init</em> service.</p><pre class="brush: bash; title: ; notranslate">

$ update-rc.d jboss defaults
</pre><p>Now your Jboss will  start automatically after reboot&#8230;</p><h3>Additional configuration</h3><ul><li><em>&lt;jboss_root&gt;/bin/run.conf</em> file configures the start parameters of the server. Maybe default limits are not suitable for your applications. So check it.</li><li>Under <em>&lt;jboss_root&gt;/server/default/conf</em> you will find some configuration files of the default server configuration. One of the interesting is of course <em>jboss-lo4j.xml</em>, where you can precisely define logging processing.</li></ul><h3>Questions &amp; Suggestions</h3><p>Thank you for reading this. Please feel free to provide any suggestions to the topic of JBoss installation on Linux and specially on Debian. Of course your questions are welcome too!</p> ]]></content:encoded> <wfw:commentRss>http://alexander.holbreich.org/2010/01/java-jboss-debian-linux/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/26 queries in 0.026 seconds using disk: basic
Object Caching 563/624 objects using disk: basic

Served from: alexander.holbreich.org @ 2012-02-04 20:33:08 -->
