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.
Thanks! I think I actually do need remote EJBs because I wish to leverage container managed web services.
When you say
container managedwhat 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.
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.
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,
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.
Thanks for the answer.
So a war packaging won't restrict the use of remote EJB which are deployed on another VM.
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.
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)
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. :)