How to configure JBoss plugin for SAR deployment?

I have been putting SARs in my deploy directory manually, with jars containing my mBeans and the META-INF/jboss-service.xml file and such, but would like to use IntelliJ to deploy. I tried a web module, but it does not really fit. Anybody been able to do this?

13 comments
Comment actions Permalink

Try the JBoss plugin. It may have what you need.

Norris Shelton
Sun Certified Java Programmer




Jeremy Hull wrote:

>I have been putting SARs in my deploy directory manually, with jars containing my mBeans and the META-INF/jboss-service.xml file and such, but would like to use IntelliJ to deploy. I tried a web module, but it does not really fit. Anybody been able to do this?

>

0
Comment actions Permalink

You can create the SAR modules from within IDEA by defining them as EJB modules and adding the jboss-service.xml as an additional deployment descriptor.

Then you should package them together into an application module in order to deploy.

0
Comment actions Permalink

When I try to deploy I get an exception, I am using EAP 3193 with 2.0 EAP4

java.lang.NullPointerException

at com.fuhrer.idea.plugin.jboss.c.e.g(e.java:90)

at com.fuhrer.idea.plugin.jboss.c.e.a(e.java:65)

at com.fuhrer.idea.plugin.jboss.c.e.e(e.java:30)

at com.fuhrer.idea.plugin.jboss.c.e.a(e.java:20)

at com.fuhrer.idea.plugin.jboss.c.m.run(m.java)

at com.fuhrer.idea.plugin.jboss.c.t.run(t.java:16)

0
Comment actions Permalink

Seems to be some configuration issue. Getting a copy of the project would help to nail down the problem.

0
Comment actions Permalink

After I sent the project, I got it to deploy, although the error still pops up.

0
Comment actions Permalink

To really analyze the problem I should have the whole project, not only
the project file itself. The relevant information is scattered through
different files.

But anyway: this error occurs if you are trying to deploy a module which
has no associated deployment source. So go to the run/debug
configuration, select the deployment tab, and check that for every module
1) either it isn't selected for deployment
2) or has a deployment source selected

Jeremy Hull wrote:

After I sent the project, I got it to deploy, although the error still pops up.


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Yes, that was the problem, the EJB module was selected for deployment, but was not configured for deployment. I changed it so that only the App module was deployed and made sure all the dependecies were included in the deployment and I was able to deploy and debug as a SAR. Thanks for the help. Are there plans for adding another configuration for deploying mBeans in the future?

0
Comment actions Permalink

Are there plans for adding another configuration for
deploying mBeans in the future?


There are some plans to create a special SAR module type, obsoleting the need to abuse an EJB module for that. But it's not quite top priority.

Can you describe what kind of support would best fit your needs? Also some sample project would give some more insight.

0
Comment actions Permalink

I have been doing very basic SARs, just a few MBeans. If you want I could email you a zip of a sample project, or whatever else you need. Let me know...

0
Comment actions Permalink

I have been doing very basic SARs, just a few MBeans.
If you want I could email you a zip of a sample
project, or whatever else you need. Let me know...


Yes, some sample project would be very helpful. You know the address...

0
Comment actions Permalink

Hi martin, can you give out the exact steps on how to configure only the App Module? I am trying to deploy an app... but couldn't find an information on how to package it correctly as a SAR.

I am new to IDEA, and is new to the application too...

:(

0
Comment actions Permalink

Hi martin, can you give out the exact steps on how to
configure only the App Module? I am trying to deploy
an app... but couldn't find an information on how to
package it correctly as a SAR.


It's not possible to use only an application module, since an application module has only limited content. Instead you have to use an EJB module to fake the SAR module.

Roughly you have to do the following steps:

- create an EJB module;
- choose to create an archive file (xyz.jar);
- modify the name of the archive file to xyz.sar;
- create jboss-service.xml manually;
- add it as an additional deployment descriptor;
- add everything you need to the module;
- create an application module;
- package the EJB module into the application module;
- build everything;
- deploy the application module.

By renaming the deployed archive file to xyz.sar, JBoss treats the file automatically as a SAR archive.

Sorry if I missed something important above. That's not quite an every-days thing which I remember in detail by heart... :)

0
Comment actions Permalink

Here is a sample project that is set up properly for build and deploy to JBoss.
http://jchull.com/downloads/SAR_Example.zip

0

Please sign in to leave a comment.