Where is JBoss AS 5?

June 12th, 2008 Radim Marek

You know the story. By the end of 2005 JBoss was releasing information about the giant steps they plan to achieve with the release of next version of application server. The question now, almost three years later, is obvious - where is JBoss AS 5?

If you’re looking for short and positive answer, I will disappoint you. Personally, I can’t foresee release of the version 5.0 this year. It might sound as a tragedy, but reality is different. Ask yourself if you really have to wait? Is it application server you need? Because if your answer is positive, it’s usually better to use something you already have. Branch 4.x is now mature and stable. It might be missing bits and pieces, but frankly, it’s not something that would stop your development. With the release of AS 4.2 you also got all JEE 5 functionality we’ve been desperately waiting for.

To understand why I don’t think it’s important to wait is the fact JBoss is not the same company anymore. Look around and you will see great improvements. Application server is no longer fighting for it’s market share, that position has been already established. Focus has been shifted to other projects within the product suite. From the obvious re-implementation of JMS broker - Messaging, jBPM, excellent rule engine - Drools, transaction engine, Seam, Eclipse Tools and many more. You still think nothing has changed?

From what I can say, changes are present through-out the middleware suite. Especially now when the Enterprise Application Platform 4.3 is available, with necessary commercial backing, updated training materials and large user community represented by all of us who are already using community versions of the products. Individual products now can get updated version - that’s just matter of time, but more important is consistent support and platform in general.

So no matter when JBoss AS 5 will be released, great things are already happening. We all started using only Hibernate or application server, and as our solutions are getting bigger, so does JBoss.

More information about individual project can be found at http://www.jboss.org/projects/

Posted in jboss | No Comments »

JBoss minimal configuration with Tomcat (Servlet Contrainer)

June 3rd, 2008 Radim Marek

For proof of concept I needed to deploy large number of servlet containers. Because I’m lazy and most of the code for main application has already been written for JBoss AS (including Login modules and set of custom services) I really didn’t want to use standalone Jetty or Tomcat. To use different solution for one part of deployment would create significant duplication of some functionality and unnecessary increased administration.Instead of cleaning-up default configuration, I decided to use for first time minimal configuration and add JBossWeb (manually). This is an overview of what has been required to achieve it.

First copy the configuration and create new profile.

    cd server/
    cp -R minimal webserver

Obviously you need to copy original JBoss Web deployer.

    cp -R ./default/deploy/jboss-web.deployer ./webserver/deploy/

And that’s where fun begins. By default JBoss Web relies on several JEE service that needs to be disabled. Edit file

    webserver/deploy/jboss-web.deployer/META-INF/jboss-service.xml

and comment out (delete) following dependencies on unnecessary services:

    <depends>jboss:service=TransactionManager</depends>
    <depends>jboss.jca:service=CachedConnectionManager</depends>

This is based on assumption you don’t need them. Once CachedConnectionManager is gone, you need to delete CachedConnectionValve from

    webserver/deploy/jboss-web.deployer/server.xml

Right now, your new webserver profile is stripped to it’s minimum and you have to add something. First necessary addsecurity related services into

<!– ==================================================================== –>
<!– Security                                                             –>
<!– ==================================================================== –>

<mbean code=”org.jboss.security.plugins.SecurityConfig”
   name=”jboss.security:service=SecurityConfig”>
   <attribute name=”LoginConfig”>jboss.security:service=XMLLoginConfig</attribute>
</mbean>
<mbean code=”org.jboss.security.auth.login.XMLLoginConfig”
   name=”jboss.security:service=XMLLoginConfig”>
   <attribute name=”ConfigResource”>login-config.xml</attribute>
</mbean>

<!– JAAS security manager and realm mapping –>
<mbean code=”org.jboss.security.plugins.JaasSecurityManagerService”
   name=”jboss.security:service=JaasSecurityManager”>
   <attribute name=”ServerMode”>true</attribute>
   <attribute name=”SecurityManagerClassName”>org.jboss.security.plugins.JaasSecurityManager</attribute>
   <attribute name=”DefaultUnauthenticatedPrincipal”>anonymous</attribute>
   <attribute name=”DefaultCacheTimeout”>1800</attribute>
   <attribute name=”DefaultCacheResolution”>60</attribute>
   <attribute name=”DeepCopySubjectMode”>false</attribute>
</mbean>

Last remaining task is to copy additional JAR files and that’s it!

    cd default/lib/
    cp jboss.jar jboss-j2ee.jar jbosssx.jar servlet-api.jar jsp-api.jar jbossws* el-api.jar jboss-ejb3x.jar ../../webserver/lib

Back in bin folder you can test new configuration profile

    run -c webserver

Don’t expect miracles, you’ll get only what you configure. In this case is basic application server, with full support for customer services and webserver. To perform more tests you need to deploy some WAR file to deploy/ folder in order to get any output, as there are no context by default.This guide has been tested on JBoss AS 4.2.2

Posted in Administration, jboss | 1 Comment »