Re: [Resin-interest] packaging EB3 application with Resin

2009-11-17 Thread Vincent LAUGIER
Hello,

thank you for your answers

My previous post might be confusing.

We have several webapps (several virtual hosts) that share the same 
ejbs. This is why we wanted to achieve this kind of packaging :

Project_EAR
- project_EJB-JAR
- project_1_WAR (www.website1.com)
- project_2_WAR (www.website2.com)


Also, we want to avoid Hessian because we want to access the ejbs with 
some simple imports/injections.

My idea of using a WAR as an EJB3-JAR was coming from the fact that WAR 
and EJB3-JAR are quite similar but as Jeff says 
(http://maillist.caucho.com/pipermail/resin-interest/2009-November/004187.html) 
classes in a WAR are out of scope for other WARs. Not a good idea then.

So in the end we will make some WARs directly deployed in the webapps 
dir (not in a EAR) and tune the ant script so that the same ejbs are put 
in the WAR at deployment.

Looking forward resin 4 !

regards

Vincent LAUGIER

Email : vincent.laug...@helmet.fr
Téléphone : 01 75 43 92 52
Fax : 01 79 75 01 12 (www.monfax.com)
www.helmet.fr



Scott Ferguson a écrit :
 Vincent LAUGIER wrote:
   
 What do you mean by defining ejbs in resin-web.xml ? Could this be a 
 workaround to package the project in differents WARs (one WAR for the 
 entity beans, another for the session beans...) ?
   
 
 Many/most applications only need a single .war file. Packaging a single 
 ..war file in an .ear just to get EJB support is silly. The JavaEE 6 
 specs have finally caught up to this concept.

 I have no idea why you would want to package your session beans in a 
 different .war file from the rest of your application.

 -- Scott
   
 regards

 Vincent
   
 
 This is only available in Resin 4. I don't believe there is a separate 
 example, however there is a detailed draft of spec published on the blog: 
 http://blog.caucho.com/?p=225


   
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


   
 
   


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

   
 




 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


   




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] packaging EB3 application with Resin

2009-11-16 Thread Vincent LAUGIER
Hello,

I am trying to package an EAR application in Resin.

So far, I have achieved this kind of package : a WAR project embedded in 
a EAR project (specifying the 'ear-deploy' tag in the resin.conf).

Project_EAR
- project_WAR


I now want to to the following : one EAR project holding one EJB-JAR 
project (for the entity beans and session beans), some WAR projects for 
the pages and servlets.

Project_EAR
- project_EJB-JAR
- project_1_WAR
- project_2_WAR


Is it possible to achieve this in Resin ? (If I need to use 
http://www.caucho.com/resin/admin/jar-repository.xtp, is there an 
example we can follow ?)

Thank you.

Regards

-- 
Vincent LAUGIER

Email : vincent.laug...@helmet.fr
Téléphone : 01 75 43 92 52
Fax : 01 79 75 01 12 (www.monfax.com)
www.helmet.fr





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] packaging EB3 application with Resin

2009-11-16 Thread Alex

On 2009-11-16, at 8:09 AM, Vincent LAUGIER wrote:

 Hello,
 
 I am trying to package an EAR application in Resin.
 
 So far, I have achieved this kind of package : a WAR project embedded in 
 a EAR project (specifying the 'ear-deploy' tag in the resin.conf).
 
 Project_EAR
 - project_WAR
 
 
 I now want to to the following : one EAR project holding one EJB-JAR 
 project (for the entity beans and session beans), some WAR projects for 
 the pages and servlets.
 
 Project_EAR
 - project_EJB-JAR
 - project_1_WAR
 - project_2_WAR

 Is it possible to achieve the same in Resin ?

Resin supports the ear layout as well as defining ejbs in resin-web.xml

 (If we need to use http://www.caucho.com/resin/admin/jar-repository.xtp, is 
 there an example we can follow ?)

This is only available in Resin 4. I don't believe there is a separate example, 
however there is a detailed draft of spec published on the blog: 
http://blog.caucho.com/?p=225

Thanks,
Alex

 Thank you.
 
 Regards
 
 -- 
 Vincent LAUGIER
 
 Email : vincent.laug...@helmet.fr
 Téléphone : 01 75 43 92 52
 Fax : 01 79 75 01 12 (www.monfax.com)
 www.helmet.fr
 
 
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] packaging EB3 application with Resin

2009-11-16 Thread Jeff Schnitzer
As a longtime J2EE developer, let me suggest that life is far more
pleasant if you abandon the atrocious EAR packaging morass and build
your applications in one or more WARs.  Just put all your classes in
WEB-INF/classes (ejbs, servlets, etc), make sure you have
WEB-INF/classes/META-INF/beans.xml and
WEB-INF/classes/META-INF/ejb-jar.xml, and it all works the way you
would expect.

Note that separate WARs will be in separate classloader scopes, so
inter-WAR calls will be Hessian not local method calls.  But this
makes life a lot easier when you want to relocate a WAR to a different
server.

Jeff

On Mon, Nov 16, 2009 at 10:02 AM, Vincent LAUGIER
vincent.laug...@helmet.fr wrote:
 Hello Alex,

 then we are waiting for the resin 4 stable release (we need to stick to
 resin 3 for the moment because of problem with the persistence context
 injection, see http://forum.caucho.com/showthread.php?t=1927).


 Resin supports the ear layout as well as defining ejbs in resin-web.xml

 What do you mean by defining ejbs in resin-web.xml ? Could this be a
 workaround to package the project in differents WARs (one WAR for the
 entity beans, another for the session beans...) ?

 regards

 Vincent
 This is only available in Resin 4. I don't believe there is a separate 
 example, however there is a detailed draft of spec published on the blog: 
 http://blog.caucho.com/?p=225



 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest







 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] packaging EB3 application with Resin

2009-11-16 Thread Alex
 Hello Alex,
 
 then we are waiting for the resin 4 stable release (we need to stick to 
 resin 3 for the moment because of problem with the persistence context 
 injection, see http://forum.caucho.com/showthread.php?t=1927).
 
 
 Resin supports the ear layout as well as defining ejbs in resin-web.xml
 
 What do you mean by defining ejbs in resin-web.xml ? Could this be a 
 workaround to package the project in differents WARs (one WAR for the 
 entity beans, another for the session beans...) ?
It's best to package an ear when there is more then one web-app. With a single 
web-app there is a possibility of deploying EJBs in a web-app. The ejb-jar.xml 
in that case is placed in to web-app and configured via ejb-server 
ejb-descriptor , see http://caucho.com/resin/reference/env-tags.xtp#ejb-server 
for ejb-server doc and 
http://caucho.com/resin-3.1/examples/ejb-stateless/index.xtp for 

Best Regards,
Alex

 
 regards
 
 Vincent
 This is only available in Resin 4. I don't believe there is a separate 
 example, however there is a detailed draft of spec published on the blog: 
 http://blog.caucho.com/?p=225
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest
 
 
 
 
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] packaging EB3 application with Resin

2009-11-16 Thread Scott Ferguson
Vincent LAUGIER wrote:
 What do you mean by defining ejbs in resin-web.xml ? Could this be a 
 workaround to package the project in differents WARs (one WAR for the 
 entity beans, another for the session beans...) ?
   
Many/most applications only need a single .war file. Packaging a single 
..war file in an .ear just to get EJB support is silly. The JavaEE 6 
specs have finally caught up to this concept.

I have no idea why you would want to package your session beans in a 
different .war file from the rest of your application.

-- Scott
 regards

 Vincent
   
 This is only available in Resin 4. I don't believe there is a separate 
 example, however there is a detailed draft of spec published on the blog: 
 http://blog.caucho.com/?p=225


   
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


   
 




 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest

   




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest