Sharing code between web-app and ejbs

2000-08-10 Thread August Linnman



Hello everyone!

This is maybe not orion-specific (off-topic) but may be 
relevant anyway.

How can you in a manageable way include "library" code, i e 
common code in an EAR which should be accessible from both the WAR and the 
EJB-JAR, and also preferably be put in the same EAR. The only way I can think of 
now is to duplicate code between the EJB-JAR part and the WEB-INF/classes 
directory, which is not a very nice solution. 

Another way would be to link the external code through another 
JAR-file, and tie together using a Manifest, but I cannot resolve exactly which 
Manifest should be used (the EAR or the JAR?) and how this should be done. I 
have read the Sun specs aboutthe Jar-manifest format but either they are 
very unclear, or I have not found the right information. 

Any clarity in this matter would be greatly appreciated. 


/August




RE: Sharing code between web-app and ejbs

2000-08-10 Thread Mike Cannon-Brookes



If you 
just put all your classes in the EJB-JAR file, they can be 'seen' from the WAR 
(no need to worry about the classes dir)

That's 
the way I do it. Probably not the best way, but it works.

Mike

-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of August 
LinnmanSent: Thursday, 10 August 2000 9:37To: 
Orion-InterestCc: Robin RosenbergSubject: Sharing code 
between web-app and ejbs

  Hello everyone!
  
  This is maybe not orion-specific (off-topic) but may be 
  relevant anyway.
  
  How can you in a manageable way include "library" code, i e 
  common code in an EAR which should be accessible from both the WAR and the 
  EJB-JAR, and also preferably be put in the same EAR. The only way I can think 
  of now is to duplicate code between the EJB-JAR part and the WEB-INF/classes 
  directory, which is not a very nice solution. 
  
  Another way would be to link the external code through 
  another JAR-file, and tie together using a Manifest, but I cannot resolve 
  exactly which Manifest should be used (the EAR or the JAR?) and how this 
  should be done. I have read the Sun specs aboutthe Jar-manifest format 
  but either they are very unclear, or I have not found the right information. 
  
  
  Any clarity in this matter would be greatly appreciated. 
  
  
  /August