Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can a web application refer an EAR as JEE library  RSS feed

 
Suhas Madap
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there anyway to refer an Enterprise Archive as JEE library from a web application deployed in weblogic application server?
 
K. Tsang
Bartender
Posts: 3630
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suhas Madap wrote:Hi,

Is there anyway to refer an Enterprise Archive as JEE library from a web application deployed in weblogic application server?


I don't think so. A project can refer to another project or library that produces a "jar" file. Not war, not ear, not rar.

Besides EAR itself may contains war, jar,rar as files. Wouldn't it be better to just refer to the direct "jar" file instead?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36440
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suhas,
What would it mean to do that? An ear file doesn't have loose classes in it.
 
Suhas Madap
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Suhas,
What would it mean to do that? An ear file doesn't have loose classes in it.


Hi Jeanne,

To be more precise with my query, there is a concept of JEE/shared library (http://docs.oracle.com/cd/E11035_01/wls100/programming/libraries.html#wp1064823) & is supported by most of application servers. By leveraging JEE library, we no need to bundle common code or any war application or EJB component as part of your application or EAR. Instead we can just use <library-ref> element in deployment descriptors, provided components are deployed as shared library.

Referring an .ear or .war or .jar from a enterprise application is straight forward, but it's not that straight forward when we've scenario to refer an .jar or .ear file from a web application.

so just want to get an expertise advice on possibility of referring a .jar or .ear from a web application.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36440
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh! Shared libraries. Yes, many app servers have them. I've only seen them defined at the EAR level so I suspect it isn't possible from a pure war file. One "solution" might be to create an ear that just contains your war.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!