Sharing common libraries and ejbs between multiple ears

Hi
I have been going through various articles at O'Reilly and discussions at serverside
(some outdated) on the packaging options in J2EE.
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html?page=2
http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
http://www2.theserverside.com/home/thread.jsp?thread_id=7530
I am still undecided as to what is the best way to package and deploy
- a set of EJBs (Stateless Session beans) and
- utility libraries
that need to be shared by multiple ears.
We have a set of components - 4 session ejbs and 15 utility classes like log4java,
xerces, custom utilities etc... which need to be shared by all applications running
on the server (in a clustered environment).
There are over 22 applications and these will be packaged in individual ear files.
If we choose to put the common EJBs and utilities in each of the application's
ear, then for every change to this common library all the applications will need
to be repackaged and redeployed, which obviously is not desirable.
If we choose to use the 'Class-Path' option in manifest file, from what I understand
the path to be specified is a relative path within the ear i.e. the path cannot
point to archives outside the .ear file, which does not serve our purpose. Am
I right in this understanding?
What is the best way to package and deploy these common components under these
circumstances?
Has anybody tried something like this before?
Would appreciate your comments on this.
Thank you.

"Kumar" <[email protected]> wrote in message
news:[email protected]...
In My opinion,
I would be packaging the all utilities into a single jar file and be using
in the application server class path directly. whenever I want to change
this jar file I can change at one shot and package this jar file and keepit
in the classpath again. This works very well, if and only if each EAR file
is not using its own version of a libary of utility jar file. All earfiles
should be using a single and common library.In this case when you update the .jar file, you would have to restart the
server. I am not aware of any good solution which alleviates this.
>
If I include this utility jar file into all ear files, the following arethe
difficulties we need to handle in the future.
- What if utility library has been changed frequently, it leads to
re-package all .ears and re-deployment
- Unnecessarily adding a copy of a single jar file to all ear files,
increases complexity
- Any new application needed to be deployed, again which uses utility, we
need add the utility jar file to ear file
- There is no logical separation and simplicity
Thanks
Kumar
"Kiran P" <[email protected]> wrote in message
news:[email protected]...
Hi
I have been going through various articles at O'Reilly and discussions
at
serverside
(some outdated) on the packaging options in J2EE.
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html?page=2
http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
http://www2.theserverside.com/home/thread.jsp?thread_id=7530
I am still undecided as to what is the best way to package and deploy
- a set of EJBs (Stateless Session beans) and
- utility libraries
that need to be shared by multiple ears.
We have a set of components - 4 session ejbs and 15 utility classes likelog4java,
xerces, custom utilities etc... which need to be shared by allapplications running
on the server (in a clustered environment).
There are over 22 applications and these will be packaged in individualear files.
If we choose to put the common EJBs and utilities in each of theapplication's
ear, then for every change to this common library all the applicationswill need
to be repackaged and redeployed, which obviously is not desirable.
If we choose to use the 'Class-Path' option in manifest file, from what
I
understand
the path to be specified is a relative path within the ear i.e. the pathcannot
point to archives outside the .ear file, which does not serve our
purpose.
Am
I right in this understanding?
What is the best way to package and deploy these common components underthese
circumstances?
Has anybody tried something like this before?
Would appreciate your comments on this.
Thank you.

Similar Messages

  • Using common jars containing EJBs in multiple ears

    I was wondering if there was an easy way to have references to jars that is contained in one ear in another ear. The main question is that if we have some EJBs that are commonly used in multiple ears then is there a way to have those common EJBs in a single ear and have the other ears that need these EJBs reference them in some way without having to copy them into those ears? Thanks ahead of time

    If you think about it carefully, one .ear file represents one enterprise application. In other words, a .ear file represents a packaged unit that must be deployable by itself.
    If one desires to use some reusable business component in one's enterprise application, all dependencies that that component might be having will need to be included in the deployable unit, i.e. the .ear file, for that application.
    On similar lines, the following is an extract from the Enterprise JavaBeans specification 1.1 (pay particular attention to the first paragraph therein)...
    The ejb-jar file must also contain the class files for all the classes and interfaces that the enterprise bean
    class, and the remote and home interfaces depend on. This includes their superclasses and superinter-faces,
    and the classes and interfaces used as method parameters, results, and exceptions.
    An ejb-jar file does not have to include the class files of the home and remote interfaces of an enterprise
    bean that is referenced by an enterprise bean in the ejb-jar, or other classes needed by the referenced
    enterprise bean, if the referenced enterprise bean or needed classes are defined in another jar file that is
    named in the Class-Path attribute in the Manifest file of the referencing ejb-jar file, or the transitive clo-sure
    of such Class-Path references. Note that this Class-Path mechanism only works with JDK 1.2 and
    later.
    You can extrapolate a similar notion for enterprise archives also.
    I guess, the simplest way to put this is, when deploying one application one cannot assume the existence of another application.

  • Same EJB in multiple EARs

    Is it possible to somehow prepend some sort of EAR based context to the JNDI
    name of an EJB? We think we will eventually have multiple EARs that have
    different versions of the same EJBs in them. I'm guessing we can somehow
    specify the version name in the JNDI name, but it might be nicer if all EJBs
    in the same EAR have the same prefix or specification.
    Any ideas?
    Thanks,
    Eric

    Having same ejb in multiple ears does not matter as long as you package your ear.
    This link talks how weblogic resolves the class loading for two different ears.
    http://e-docs.bea.com/wls/docs61/programming/packaging.html#1048725
    "Eric F" <[email protected]> wrote:
    Is it possible to somehow prepend some sort of EAR based context to the
    JNDI
    name of an EJB? We think we will eventually have multiple EARs that
    have
    different versions of the same EJBs in them. I'm guessing we can somehow
    specify the version name in the JNDI name, but it might be nicer if all
    EJBs
    in the same EAR have the same prefix or specification.
    Any ideas?
    Thanks,
    Eric

  • How to turn off sharing e-mail and messages between devices

    how to turn off sharing e-mail and messages between devices

    It's well hidden. Took me a few minutes to find it, even though I remember turning it off.

  • Drag and drop between multiple instances of an executable

    I want to know if there is a special way (not using Windows API) to drag and drop data between multiple instances of a same executable. 
    I have an application built in LabVIEW, where the main window can open a child window. Each window has a plot control. Between the two windows, a plot data of main window can be copied by drag and drop. 
    And I open another instance of the same executable. Now there are two executables(A and B).
    I want to drag and drop a plot data from the main window of B to the child window of A. But in this case, Drag Enter Event is not fired. I think that the event seems to be fired only inside an executable.
    http://digital.ni.com/public.nsf/allkb/AB268878693EF4B586257037004A6725 says that Queue or Semaphore is working only inside an executable. Is drag operation also valid only inside a process?

    Hi,
    Placed images (as opposed to pasted images) in Indesign are by their very nature pointers to an external image file, so there is no way to slim down the size of your exported PDF other than by playing with the export settings. Other than that, ensure that your file is placed in Indesign at 100% and at the correct resolution for your desired output. If you open the PDF in Acrobat, you can also save as a reduced size PDF which may help.
    Good luck!
    Malcolm

  • Husband and Wife trying to combine music libraries and share between all Apple technologies in the house.

    My husband and I both have apple ids which we use to purchase music, movies etc...  We want to combine our libraries and pull from the same.  We've been doing this manually - but wonder if we can use the Cloud to support 2 apple ids or if we have to create a 3rd apple id / email and somehow transfer our individual music to the 3rd apple id / email.  Creating the 3rd email / apple id will be a pain since we will never use this as an email.  We need Help figuring out the best approach.

    You can't combine two Apple IDs... I have the same problem I have an iCloud mail account and an Apple ID i use to purchase music with and I'd love a way to combine them. Apple has said in the past their looking into a possible way of doing this but I'm doubtful they will... :/
    However, sounds like iTunes Match will probably be the right solution for you http://www.apple.com/itunes/itunes-match/

  • Sharing free busy and GAL between exchange organization.

    HI, we are looking to share free busy and GAL between 2 exchange organizations. Thus far using the Microsoft federation gateway appears to be the better option for us to achieve this. Although due to both exchange organizations using the same SMTP email
    domain we may run into issues trying when both organizations attempt to create the federation trust using the same autodiscover.abcdomain.com
    What is the recommended approach to work around this issue?

    Change the e-mail domain in one of the organizations.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • How do I sync and switch between multiple camera angles?

    I shot a concert with 3 HD cameras. I though it would be relatively simple to sync and cut between them but it's turning out to be much harder than I expected. I'm sure I'm not the first person to do this. Anybody have any tips and tricks on how best to combine these into a single multi-camera video?

    Multicamera editing is not easy with Premiere Elements.
    If you work in Mac environment, you can use Final Cut Pro X or Premiere Pro, they have multicamera functions which
    permit simple editing by showing simultaneously video clips and you can choose by clicking the one you want to have
    in the final movie.
    In Windows environment, you have tools like Premiere Pro, or Sony Vegas Pro or Magix video deluxe Pro that are
    natively supporting multicamera editing.
    One important point is synchronizing the clips. If you are musical expert, you can do it with the sound tracks and align on the
    sound curves, manually. Not easy for me, but I have a friend in my video group who makes it very well. In Mac environment,
    Final Cut Pro X has an automatic function to synchronize video tracks on sound track basis. In windows, I know
    there is a program : PluralEyes which does this synchro.
    These different tools are not free unfortunately.
    Best regards
    JM

  • How do we split editing and enconding between multiple PC's?

    We've been using a single Win PC for editing and encoding our videos but when editing, the encoding stops and we would like to find a way to split these two tasks between two computer.
    So, one for editing, one for encoding.
    Now, we send a project to rendering from Premiere Pro TO MediaEncoder, but how do we do this if MediaEncoder is running on another PC ?
    Thank you

    Adobe Anywhere http://www.adobe.com/products/adobeanywhere.html "may" do what you want

  • Sync send folders and templates between multiples devices

    hello there,
    I have to send many emails and use a lot of templates as I am a sole trader and I contact ppl to find work. I need a solution to keep sent folders of emails, all contacts and also template folders on multiple devices in sync. I am using 2 pc's and one Ipad currently.
    I would further like to sync with a macbook I am going to but soon. Unforutnately I dont know of any email client able to do that yet.
    Is Thunderbird able to do that? Or is a feature like that currently in developement? I might have to try outlook for this. But honestly I dont like Microsoft. I would much prefer to use Thunderbird. I would even be willing to pay money for this feature. I am so desperate for an email programm to be able to synchronize a complete account with all templates I made etc on multiple devices.
    I would greatly appreciate if you could take out the time to help me

    This is an email protocol thing and not an email client thing.
    IMAP syncs different folders across multiple devices. POP only connects to the Inbox of the email server.

  • How do I switch from "one Mozilla window to the next?" I want to go back and forth between multiple windows by using a keyboard shortcut. Please help.

    Does anyone know the shortcut for this action?

    Hi,
    You can try '''Alt''' + '''Tab'''.
    [https://support.mozilla.org/en-US/kb/Keyboard+shortcuts?s=keyboard+shortcuts Keyboard Shortcuts]

  • Sharing of video between multiple applications,

    Is there software that allows the sharing of the iSight cam between multiple applications at the same time.

    Welcome to Apple Discussions, HappyMacste
    Apple's iSight "Your camera is in use by another application" message says "iSight can be used by one application at a time."
    http://b-l-a-c-k-o-p.com/CamCamX.html claims "you can use all your favorite cam applications AT THE SAME TIME."
    EZ Jim
    PowerBook 1.67 GHz   Mac OS X (10.4.10)    G5 DP 1.8  External iSight

  • Syncronising address book and Calander between macs

    Hi
    I have Mini Mac (Tiger), Macbook (Leapord) and Airport express. I want to keep the address book and calander syncronised automatically.
    I do not have mobile me. I mainly use google mail.
    Does isync help of howelse do I do it?
    Badrakumar

    No, iSync is for syncing Contacts and Calendars to third-party mobile phones and PDAs. It does not sync anything between Macs.
    Apple's MobileMe is for syncing Address Book and Calendars between multiple Macs.
    You might also be able to use Google's new CalDAV feature:
    http://www.google.com/support/calendar/bin/answer.py?answer=99355&topic=13949
    Or SpanningSync:
    http://www.macupdate.com/info.php/id/24117/spanning-sync
    Or BusySync:
    http://www.macupdate.com/info.php/id/25922/busysync

  • Sharing a iMovie 08 library between ultiple machines

    Is it possible to share a iMovie 08 library (Events and Projets) between multiple machines?
    Cheers
    Henrik.

    Hi, Henrik. I had the same question a few pages back. I haven't seen an answer yet in this forum, but the answer I got from my friend who works as an Apple Genius is yes you can share the events, though not at the same time, if they are stored on a drive that multiple computers can access. I don't know if you can share projects; I think probably not as the project files reside on the local machine and not the external drive. I may be wrong about this, however.
    I haven't yet been able to test this out (waiting on iLife 08 and a new iMac), so I cannot verify this myself, but I do hope my friend is right.

  • Common JAR file between EJB and WAR inside an EAR

    Hi,
    I'm trying to deploy an EAR application outside the development environment and I have the following problem.
    My EAR has the following structure :
    application.ear
    |-- ejbs.jar
    |-- web.war
    Inside the WAR, in /WEB-INF/lib/, I have a set of JAR files that are used by the Web app and also, of course, by the EJB.
    During the deployment step, EJB module cannot be deployed because it miss some classes into the classpath.
    I think it is a common problem in J2EE development, so does someone has a solution for this problem ?
    Please note I'm using Macromedia JRun 4 SP1 on Windows XP.
    Regards,
    Damien.

    Ok,
    I have found a solution that seems elegant to me. I'm going to try and explain...
    My appli.jar EJB module and my appli.war Web module are using both two JAR, let's say common.jar and util.jar.
    The way to share those JAR between the two modules is to have the following structure for the EAR :
    appli.ear
      |-- appli.jar
      |-- appli.war
      |-- common.jar
      |-- util.jar
      |-- META-INF
           |-- application.xml
           |-- manifest.mfIn this structure :
    * the common.jar and the util.jar are not part of the WAR (/web-inf/lib)
    * the manifest.mf file has the following content :
    Manifest-Version: 1.0
    Created-By: My Application
    Class-Path: common.jar util.jarPlease note that space is used as separator for the classpath entry to allow independancy from OS.
    And you know what ? It works ! Well, on Macromedia JRun 4.0 SP1 and on Windows XP but I hope it works on other platforms.
    I hope it will help a lot of people because I spent a lot of time before to find a solution !
    Regards,
    Damien.

Maybe you are looking for