views:

35

answers:

2

I am using JBoss AS 5 + 6 as an application server, however only as a simple EJB3/Web container with ear and war deployment but without special capabilities such as clustering, ejb2 or hornetq.

JBoss AS provides server profiles for different uses but I did not find any documentation on how to create my own or customize an existing profile. How can this be achieved? And where is it documented on the internet?

+1  A: 

I haven't seen any documentation on this, because I'm not sure it's something you're really supposed to do.

Having said that, I've been doing it for years, and it works great for me :)

It's a bit of a hit-and-miss task, though. You need to go through the deploy and deployers directories, removing any services or deployers that you don't need. You'll find that they have inter-dependencies on one another, though, and it's not always obvious what depends on what.

Take it one at a time - start with an existing profile (e.g. default), copy it (e.g. to myprofile), then start by removing one thing you don't need (e.g. the deploy/messaging directory), then start it up with that profile (i.e. run.bat -c myprofile), and see if it starts up OK. Try this with each service you want to remove. If you removing something it needs, it'll complain, and tell you what depends on it.

skaffman
Actually that's how I already tried to do it, I tried both to extend the web profile and to reduce the default profile to suit my needs. The main reason why I want to "clean up" the JBoss is to remove its huge memory footprint. I think I will switch to Glassfish as it provides the kind of modularity I want.
nicore
@nicore: It's much easier to remove things from a profile than it is to add them. But yes, GF's modularity is far superior, from what I can tell. If I were doing a greenfield development, I'd choose GF over JBossAS.
skaffman
+2  A: 

If you want create your own profile you have to create your own profile, which can base on one of the standard JBoss profiles: minimal or default (if you want clustering you can also use all or production profile).

If you choose minimal profile you have to copy necessary services to it (for example from default profile). You have to remember about config files, deployers and so on.

If you choose default profile you have simple remove unnecessary services.

In my opinion it is much easier to remove some services.

And the most important point: there is JBoss documentation what you have to remove from profile to disable given service: JBoss 5.x Tuning/Slimming.

Lukasz Stelmach
Thanks, that was what I was searching for.
nicore