-
1. Re: Maven 3 and EAR
lightguard May 20, 2011 3:57 PM (in response to smilder)You'll be fine with a war. The only two reason for ears, imo are:
- Sharing EJBs among multiple wars
- Using remote EJBs
There may be some others I'm not aware of, but those are the two that I recall.
-
2. Re: Maven 3 and EAR
smilder May 20, 2011 7:44 PM (in response to smilder)Thanks! I think I actually do need remote EJBs because I wish to leverage container managed web services.
Best,
Seth
-
3. Re: Maven 3 and EAR
lightguard May 20, 2011 9:16 PM (in response to smilder)When you say
container managed
what is it you want to get from the container? Transactions? Security? Something else? I believe you can do those things with Seam 3. If not, we should probably address them. -
-
5. Re: Maven 3 and EAR
lightguard May 23, 2011 2:04 PM (in response to smilder)404. Could you just describe what you want? There really isn't any reason you couldn't do it with normal POJOs, or inject local EJBs into the webservice to actually do the heavy lifting.
-
6. Re: Maven 3 and EAR
mobwerner May 25, 2011 4:44 AM (in response to smilder)Jason,
Can you explain a bit further?
Your first reason why to use EAR is clear to me. (EJB shared for multiple WARS)
But the second one is not very clear to me.
If for instance we have multiple applications and one application uses functionality of another appliction by its remote EJB interface, we can not deploy this consuming application as WAR Archive. Is my understanding correct?
We are about to start a project in SEAM 3 and we want to start off from a seam booking application to have a skeleton structure available. As for now, there are no EAR example available amongst the seam 3 examples as mentionned before. So being enforced to use an EAR packaging would complicated things unnecessary.
Thx for your answer,Werner
-
7. Re: Maven 3 and EAR
lightguard May 25, 2011 3:06 PM (in response to smilder)If the wars are in the same ear you should be able to use the local interface because it's local to that deployment, if they're in separate ears or a different vm then you'll have to use the remote interface.
-
8. Re: Maven 3 and EAR
mobwerner May 26, 2011 5:38 AM (in response to smilder)Jason,
Thanks for the answer.
So a war packaging won't restrict the use of remote EJB which are deployed on another VM.
-
9. Re: Maven 3 and EAR
lightguard May 26, 2011 3:06 PM (in response to smilder)I think we may have misunderstood each other. EJBs deployed in a war only support the local interface. If you need remote, you'll have to go to an ear, at least that's how I understand it.
-
10. Re: Maven 3 and EAR
mobwerner May 29, 2011 9:07 AM (in response to smilder)Jason, thanks for the follow-up.
I was scanning the internet about some articles which would explain this.
On the IBM site , I found the following article
As I understand, remote EJB are possible inside a WAR and also the invocation of remote EJB is possible when your application is packaged as a WAR.
As English is not my mother tongue, can you verify if what I understood is correct.
So I guess there' s no explicit need for EAR packages unless you want to call services via their local interfaces. (the first reason you mentionned)
Thx again,
Werner
-
11. Re: Maven 3 and EAR
lightguard May 31, 2011 2:05 AM (in response to smilder)Looks like I misunderstood the spec, I thought only EJB 3.1 Lite was supported in wars, but really that depends on the server, if the server is full profile then you can do everything save EJB 2.1/1.1 entity beans in a war. Of course if the container is only Web Profile then that's all you get in a war.
Seems to me like you only need an ear if you want to share EJBs (using their local interface) with multiple wars. :)