Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Fred Motte

+ Follow
since Jul 28, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fred Motte

Hi ramprasad,

In fact servers handle also VPN connection and message are regarding management od those vpn connection.

A WebService server receive command, and after processing convert them in message for the "vpn server".

In order to be efficient regarding the VPN connection, vpn client must establish connections close to their location.

We have several server deserving different geographic area.

So, the message and their processing are the same on all server, just they location differ.
There is one MDB per server, each listening on a specific JMS property like country or area.

The WebService server knows the vpn server and dispatch message to each of them.

I don't want to build an ear for each server (especially in case of update).
Now I'm looking for an signle ear and a geronimo deployment plan for each server. but I get stuck with geronimo deployment plan..
I 'm a newbie with java EE and Geronimo, so If somebody has an idea...

Thanks a lot for all your comment...


I understand you are a bit confused....
Yes, I would like a config file to change some few characteristics of a given instance of the same soft but not ejb-jar.xml.

With ejb-jar.xml, I'm able to deploy a ear (the same for all server) with a separate ejb-jar.xml (specific to each server).
This step is acceptable for the first deployment of the server

But each time I need to update the software, I also need to deploy the ear with its specific ejb-jar.xml,

That is not easy to get the ejb-jar of a specific server in order to deploy a new ear.

Moreover, I have already a config file (simple property file) used by other process in the server and already containing the relevant information (geographical area).

You know, it would be cleaner to use this information to build my selector...

I will learn more about deployment and descriptor on Geronimo. perhaps, I miss something.

Thank you.
It is what I do currently,
but I have to build an ejb-jar.xml for each server and package them each in an ear different .

AFAIK, ejb-jar.xml is only read when deploying ear.

I think, I'm not enough skilled in Java EE and thus I should miss something trivial ?


It seems that Attribute value must be a "compile time" constant.
I explain :

It works fine when I declare my constant like this :

But if I want to compute my constant like this :

I get the error code "Attribute value must be constant" during the compilation of

I'm affraid that annotation must be well define even before initialization of static class.

Thread found on javaRanch : Setting Dynamic element values in an Annotation
Thanks a lot for your quick answer,

I'm using Geronimo 2.2 (EJB 3.0), if I remember @startup doesn't exist yet in 3.0.
In order to trig some processing I've already used a workaround : A web application (servlet) that use the <load-on-startup>.
I will try to define a constant at this time and use it.

Thank you for the idea, I will keep you informed...

I have several servers running the same code but each handling specific messages (they are spread by geographical area and must should treat all messages related to their area)

I thought to use a single queue and a message selector to filter the different message.

The question is: how to write Java code and deployment plan so that the selector is configured dynamically, based on a config file, the config of application server ( Geronimo 2.2)

The goal is to have the same EAR deployed on all servers.

Thank you.