Communication between sibling webapps? ( also posted to the jsp forum )

Hi Folks,
I'm working with a web application ( with multiple webapps ) in which some requests to some of the webapps ( call them A, because they are all similar ( one for each of our clients ), but may have their own ( possible multiple )specific implementations of an interface that is available across the application ) are handled ( via a RequestDispatcher include( request, response ) ) by a servlet in another webapp ( I'll call it B ), that provides some specialized services ( and receives the Request it is working on ). The include is part of an custom jsp tag, which is used on some of an A's pages, and which always includes from B.
B's service may need an instance of one of those A-specific implementations, but the service doesn't know whether that is the case, or which specific implementation class to use until it receives the request. The problem is that if the .class file is in A's WEB-INF ( classes or lib ), if B's code uses Class.forName ( or similar ) it can't see the class, because its ClassLoader is a sibling of A's, and not a parent.
This has been dealt with so far dealt by putting ALL of the implementation classes in B's WEB-INF, but that is ugly, crowded, and confusing ( and possibly risky - a typo in a configuration file could have A1 using an A2 implementation ). So, it would be better to move the implementations to the appropriate A's WEB-INF.
The question is, what is the best/recommended/cleanest/least-risky ( multiple answers accepted ) way of letting B's service get the specific implementation it needs.
So far the possibilities that I've heard are ( in no particular order ):
---- 1 ----
a. Have the tag instance get the ClassLoader of the page the tag was on, and add it as an attribute to the request.
b. The service looks up ( from configuration ) the classname it has determined it needs, as it does currently.
c. Have the service get the ClassLoader from the attribute, and use it with something like Class.forName( String, boolean, ClassLoader ) to instantiate the implementation it needs, and use it.
---- 2 ----
a. Like 1, except that the tag passes an instance of some factory that was loaded by A's classloader, that will be able to load the implementation whose .class file is in A.
---- 3 ----
a. Have the tag try to determine the implementation that will be needed, instantiate it, and pass it along as in 1 or 2. ( and WHEN it will be needed - the service isn't used on all paths through the tag, though that is also the case for 1 & 2, but there the attribute value can be the same instance each time, while in this case, we probably need a new instance of the implementation )
---- 4 ----
a. Do something else ( please fill in the blank )
Any suggestions will be greatly appreciated - as well as comments on the issues that might be involved with each possibility.
( I apologize for the over use of parentheses, but that's the way I think - early LISP influence )
Thanks,
George McKinney

Most web application servers have a means of sharing common libraries between web applications. In Tomcat you can put the common libraries in the common or shared directory. In Weblogic you can bundle the war files in an ear file and put the APP_INF directory of the ear file. Consult the documentation for your web application server for how it's classloading works.

Similar Messages

  • Obtaining Tomcat Version (also posted on the JSP forum)

    Hi,
    Sorry to be double posting - I don't usually but this is kind of important and I thought perhaps some of you java gurus could help out.
    I am creating an installation program that searches the disk for tomcat server. Once I have found the tomcat.exe program I am assuming tomcat is properly installed.
    What I need to do next is get the program version. Are there any features offered by Java that do just this ?
    Thanks for reading, I would be glad for any help...
    BadLands

    Thanks SaturnBlues,
    I had also thought about looking at the server.xml file which contains the version - but say my app should be compatible with later versions of tomcat - I shall be in a rut if they change the naming conventions...and so on.
    I was thinking more in the lines of getting hold of the version through the properties or something (you know - when you right click under windows and you get the version tab...).
    But I don't have a clue what java offers down these lines.
    BadLands

  • Why aren't I allowed to post in the iPad Forum?

    I was allowed to post in the iPhone forum but now I'm told that I'm not allowed to post in the iPad forum! What is going on here?
    EDIT.
    Disregard; I went back and tried for the 5th or 6th time and it seems to have posted. Jive software must being acting up again!

    The forum likes to log me out for no reason just before replying to posts...I'm logged in, I click on the reply button, then BAM! I'm logged out. Happens many times in a row as well within the same session. It's quite maddening.
    This could be what's happening with the OP.

  • How do you answer a post on the old forums?

    I see there are many new posts on the old forum.
    When clicking reply, it takes me to the new forum.
    I expect this means that the old posts are now read-only and will not be
    migrated to the new forum?
    A great deal of time went into posting in the old forum by everyone.
    Has this work been lost now?

    DavidBedford wrote:
    Has this work been lost now?
    It is read only until the 26 February.
    Any threads that were e-mailed to the mods before 6 January 'might' make onto here.
    I asked about any threads created after 6 January (on the old forum) and didn't get a reply in time
    -+-No longer a forum member-+-

  • Ports required for communication between Web servers and service applications (the default is HTTP)

    We're using SharePoint 2010, I'm the system admin for a SharePoint farm. We enabled SharePoint Search by adding a Search Service APplication. One of the crawl report timer job is failing every 5 minte with the error "Cannot connect to remote server".
    After digging around, we found that the server running the timer job tries to connect to the SearchAdmin.svc on the index server, over HTTPS / port 32844 However, communication over SSL via a non default port is blocked by our firewall.
    According to this article: https://technet.microsoft.com/en-us/library/cc262849.aspx the default is HTTP for communication
    between web servers. How is it possible that it's trying to connect over SSL?

    Hi,
    Quoted from
    https://technet.microsoft.com/en-us/library/cc262849.aspx#ServiceApp :
    You can change the protocol and port binding for each service application. On the Service Applications page in Central Administration, select the service application, and then click
    Publish.
    Here is an article for configuring Windows firewall port rules for SharePoint using PowerShell in case you need:
    http://www.xylos.com/default.aspx?id=1050
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How do you find what you posted to the support forum?

    Last night I posted a question about Firefox being unable to load certain https URLs, but now I can't find it. I would like to be able to find it to see if anyone has made any helpful replies. In the forum settings, I have the following checkboxes:
    Watch forum threads I start:
    Watch forum threads I comment in:
    Watch KB discussion threads I start:
    Watch KB discussion threads I comment in:
    Send emails for private messages:
    All of the above settings are checked, but I can't find where in the interface for these forums I should go to view the threads and comments that I am "watching."
    I will bookmark this present support topic so that I can return to it later.
    thank you for any help you can provide!

    ha ha ha oh my god...
    okay, thank you for the help... I see what the problem is... this web site's UI has a shortcoming...
    this URL:
    https://support.mozilla.org/en-US/home
    appears to be the home page of the forums... but it is not....
    the home page of the forums is buried in a link off to the side in a list labeled "For Contributors"... I mean... by seeking help in the forums, I'm now a "contributor"? ehhh... English... It'd be nice if the UI designers would use it...
    the home page to the forums is found via this URL:
    https://support.mozilla.org/en-US/questions
    See... whoever named that URL had the right idea... instead of
    https://support.mozilla.org/en-US/contributors , the person used:
    https://support.mozilla.org/en-US/questions
    hmmm.... now if the heading on the right said:
    "For people with questions"
    then I would have scanned it more closely, and I would have noticed "Support Forum Home" in the list.
    I think the fact that so many people use Firefox is really a testament to how bad the other software out there really is, not to how good the Firefox stuff is or how responsive the firefox people are... E.g. is anyone going to actually learn from my above experience, and make the support forums easier to find?
    Is anyone going to actually put a link to the forums in the dashboard for the account that is used to log into the forums?
    No, not a chance...
    I mean, yes, I get that the link to the forums home page is always in the footer at the right, but come on, for crying out loud... so are stupid advertisements... it's a footer or side bar or whatever you want to call it... people are trained on a subconscious level, by now, to ignore that crap. If you were going to design a forum, would you take the most important links, and put them off to the side, where they are less likely to be noticed?
    This is what I see when I bring up my dashboard:
    https://support.mozilla.org/en-US/user/630258
    I mean, if you are a small time developer, with a few thousand users, you probably don't have the time or the resources to make something that's optimal... but when you have millions upon millions of users... optimizing your interface might be worth looking into.... you know... auditing the performance and effectiveness of your UI now and again might be a good idea... You take the few minutes that you waste a user with a confusing counter-intuitive non-standards-based interface, and you multiply that by millions of users, and what can I say... that's a *lot* of waste.
    You don't even have an index of forum content... everything is found by searching... Imagine if you walked into a library, and they had NO catalog.. Instead, all books just tossed into a database, and the only way to find anything is by searching. That would be... just incredibly stupid.... That is what this forum interface is.

  • Some of my posts on the Portege forum don't appear

    I've posted regarding the use of face recognition on the new R600, which we have just received. However, my posts on that topic have not appeared in the forum.
    Why?

    Hello
    If you cannot find your posting in category you wrote maybe moderator removed it into other category. Best example is your posting about face recognition tool. This tools is not on Portege notebooks only and it is good to have it in the right category.
    Are you agreeing with me?

  • Can someone answer this post in the Mac forum?

    b noir or Pac or anyone?
    http://discussions.apple.com/thread.jspa?threadID=696413&tstart=0
    M

    Good catch, I replied too it. Usually when I see post and it says they have a mac I just reply...
    "This is itunes for windows, if your doing this on a mac you need to post in the itunes for mac forum for better help"
    I do that because sometimes even tho it says mac there doing it on there PC or a friends PC.

  • Communication Between Two WebApps

    Hi,
    I have a situation where I want to invoke another web application from my web app, collect the result from this call (to another web application) and use it in my screen.
    e.g. I have a screen where I accept Customer information. In second screen I want him to specify his Geography information (another WebApp). And the selected result should be set in the Customer information, screen.
    WOuld be interested in knowing - what are the various possibilities exists?
    I know that one way is to do it with the sendRedirect. But my requirement also includes getting results from another web apps.
    The constraint here is that, these two web apps work on two different databases and it is not possible to just pass keys and access information from database.
    This essentially mean that we have to somehow pass objects between web applications.
    If any of you have some different solution or know of certain limitations - please share.
    Thanks in Advance.

    The application requires screen level integration:
    1) Screen level integration, because from first application I have to invoke second application page. Information collected from this page should be passed back to first page.
    Secondly, the first application need the information from the second application screen (object model differs in the two applications).

  • Swing related question wrongly posted in the JDBC forum

    The OP needs some sort of dynamic table model. He does not seem to understand the difference between JDBC and Swing so I am not hopeful for an easy resolution.
    The table model used appears to be static so it is not wonder that the new rows are not visible.
    I asked the OP to post their questiopn in here several times so far but it seems rather hopeless. Perhaps someone here can help.
    http://forum.java.sun.com/thread.jspa?threadID=699957&tstart=0

    If you have CC you get Edge and you are free to use it any DPS work you do, including Single Edition.
    Bob

  • Am I posting on the wrong forum?

    Posted my question 24 hrs ago and bumped it every 4 hrs or so
    but no response. If my question belongs somewhere else that's fine,
    but does anyone have any suggestions for where I should post?
    -- Ody

    On 09 Apr 2007 in macromedia.dreamweaver, OdysseusReborn
    wrote:
    > Posted my question 24 hrs ago and bumped it every 4 hrs
    or so but no
    > response. If my question belongs somewhere else that's
    fine, but
    > does anyone have any suggestions for where I should
    post?
    In addition to the advice about Easter and all:
    - This is a volunteer forum. None of us get anything for
    posting here.
    - Most of the answers come from the NNTP side of the forum.
    Bump posting
    is, at best, annoying to those of us on that side of the
    forum, and will
    get you ignored fairly quickly. If you feel a need to repost,
    at least
    wait a day or two.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • SQL Loader - Also posted in Database-General forum

    Hi All,
    I am using Oracle 9i and am new to it. I created a new user and I am not very sure if I assigned all the priveleges and roles correctly.
    Problem is that I cannot log into SQL Plus and neither can I use SQL Loader. Am working in Windows XP environment. I can connect to SQLPLUS and SQL LOADER with the usual scott/tiger userid/passwd. Why cant I connect with the username/password that I created?
    I can use the Enterprise Manager Console provided by Oracle with scott/tiger as well as with the new username/password that I created. But why cant I connect to SQL Loader and SQL Plus?
    Regards,
    Mahesh.

    The error says:
    ORA-01017: invalid username/password; logon denied
    Which seems to indicate that you are not using correct
    password that you assigned when CREATE USER command was
    executed.
    Possibly, when you connect using enterprise manager, you
    might be connecting as SYSDBA which allows you to login
    since your NT userid might be part of the DBA group.
    try conncting to the database using the AS SYSDBA syntax
    when using SQL*Plus:
    click on START -> RUN
    and type "SQLPLUS.EXE /nolog" (without double-quotes) and click ok.
    At the SQL prompt, type connect <username> AS SYSDBA
    and see if you can connect.
    If you can, this means that when you created this new
    user you gave it SYSDBA privs. and at that point,
    password (or the username for that matter) is ignored.
    See the following session. here I do NOT have any user created by the name "XYZ" still when I connect AS SYSDBA,
    it allows me to connect:
    =======================================================
    SQL> connect xyz as sysdba
    Enter password:
    Connected.
    SQL>
    =======================================================

  • Adobe RoboHelp 7 and the Adobe Technical Communication Suite have just been posted

    Hi, folks.
    The long-awaited Adobe RoboHelp 7 and the Adobe Technical
    Communications Suite have just been posted on the Adobe website.
    There are 30-day Trial versions that can be downloaded here:
    http://www.adobe.com/ap/products/robohelp/
    Follow the link that says "Download the trial". After you
    sign in, you can download either the RoboHelp 7 standalone release,
    or the Technical Communications Suite which contains these
    integrated products: RoboHelp 7, FrameMaker 8, Adobe Captivate 3
    and Acrobat 3D.
    If you or members of your team use both RoboHelp and
    FrameMaker, I'd strongly advise you take a look at Tech Comm Suite.
    It's more than simply a "bundle:" of products. There is real
    integration among the apps. Here are details:
    http://www.adobe.com/ap/products/technicalcommunicationsuite/
    For some screenshots and information, check out Peter
    Grainge's website
    http://www.grainge.org/pages/authoring/rh7/rh7.htm
    I will also be posting some Adobe Captivate movies of the new
    interface on my website in the next day or two.
    http://www.hypertexas.com
    You can also read more on the Adobe Tech Comm Blog
    http://blogs.adobe.com/techcomm/technical_communication/
    These are exciting times. Two releases in one year! I don't
    think there's any doubt about Adobe's committment to RoboHelp now
    Thanx,
    John

    The first thing I looked at was the upgrade price, which is I
    think is pretty reasonable. I may not have made it clear in my
    other post that I installed the RH7 trial with RH6 still installed.
    I'm pretty sure management will spring for an upgrade, and I don't
    intend to use RH6 simultaneously at that point--only while I'm
    doing the trial.
    The main thing I'm checking out is the double-byte character
    support. One complaint I have there is that in HTML view, Japanese
    characters are showing as squares. If I open the same topic file in
    Notepad, the Japanese characters show up there, so I know RH7 isn't
    really messing up the characters, it's just not displaying them in
    HTML view. This still makes it difficult to manipulate Japanese
    text in HTML view. Does anyone know if there is a way for these
    characters to display in HTML view properly? Should I start a
    different post? Thanks,
    Ben

  • Communication between Two WebLogic instances on the same machine

    Hi,
    We're having a problem with communication between two copies of Weblogic on
    the same machine. They are configured with seperate ports (regular and SSL).
    Independantly, they run fine. I can access EJBs running on either of them.
    The problem is that a bean in one of them has code which attempts to access
    an EJB on the other one. The procude fails when trying to obtain the initial
    context. This same code works if compilied independantly of WebLogic on the
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

    Thanks for the prompt reply.
    There is one IP address (internal address 10.227.1.34) one the machine. WLS1
    is set up at ports 7001 and 5133. WLS2 is setup at ports 7004 and 7005.
    When WLS1 attempts to obtain a context to WLS2 with the URL
    t3://10.227.1.34:7004/ it pauses for a long period of time. Running truss
    on the both WLS processes shows communication occuring between the two
    followed by long periods of silence. Finally WLS2 spits out the error
    ConnectionException[7001,7001,5133,5133,7001,7001] (paraphrased, I can get
    the entire error if it would help).
    After another long pause, WLS1 quits trying with the error 'Server
    10.227.1.34:7004 not found' (again paraphrased).
    Among the things we've tried:
    * Changing the URL from the IP to 127.0.0.1
    * Enabling/disabling SSL on either or both WLSs.
    * Changing the server name in WLS2's copy of weblogic.properties from
    'myserver' to 'myserver2' (previously they were both 'myserver')
    * Upgrading WLS2 to 5.1.0sp5 (Tried upgrading WLS1, but was getting class
    not found errors and quit because that WLS is being used by other people)
    This is a Solaris server. WLS1 is running 5.1.0 and WLS2 is running 5.1.0sp5
    Any suggestions would be appreciated.
    Best,
    Randy Yarger
    marchFIRST
    [email protected]
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    There should not be. What is your network configuration? Are they on
    separate IP addresses?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Randy Jay Yarger" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We're having a problem with communication between two copies of Weblogicon
    the same machine. They are configured with seperate ports (regular andSSL).
    Independantly, they run fine. I can access EJBs running on either of
    them.
    The problem is that a bean in one of them has code which attempts toaccess
    an EJB on the other one. The procude fails when trying to obtain theinitial
    context. This same code works if compilied independantly of WebLogic onthe
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

  • Communication between the primary server the gateway server

    hallo
    Can I set the directional communication between the primary server the gateway server, so it feels by the following example?
    And if so how?
    Agent
    à GW
    ß GW
    ß MS
    *Agent communicates with GW1 and reported it
    *GW SEND report to GW2
    *GW2 Send the the data to MS
    thanks
    <o:p></o:p>
    אם תגובתי פתרה את בעייתך - לחץ/י, על &quot;סמן כתשובה&quot; ליד סימן ה V הירוק.

    Hi,
    As far as I know, Gateways dont talk to each other. Why you need two GW, with one GW and report to your management servers, this way should work.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/323d5aab-bad4-4c23-b096-27a62757ae31/communications-between-2-gateway-servers-and-2-ms?forum=operationsmanagerdeployment
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

Maybe you are looking for

  • Saving for Web, Saving for Print

    I have Photoshop Elements 9 & 11.  I realize that for the best resolution for prints, the dpi should be at least 220.  For web, pics can be saved as little as 72 dpi.  Questions:  if I want to have print AND web versions of pics, is it best to save t

  • The drag and drop feature is not working on the touchpad

    My drag and drop stopped working on my macbook pro, the model number is the MB 13.3/2.4/2X1GB/250/SD/BL-KB-USA MB467LL/A The systems is runnng Snow Leapard, I have in the preferences, drag lock disabled, dragging enabled, the operating system is 10.6

  • How do change SQL Express's in my application?

    How do I change an older application created under SQL Express 2005 to SQL Express 2008(R2)? I can run this application  using Debug, but can't publish it because of the following message: INSTALL LOG: The following properties have been set: Property

  • Trying to find the URL used when installing Flash player via ActiveX pop-up

    I'm trying to determine what URL would be used when a customer clicks on the Activex Pop-up to install Flash player.  I've found a document that indicates the URL used when updating Flash Player via the Auto updater, but I think they are different UR

  • Forgot password on MBPro w/Lion OS 10.7.2

    I have reset my Lion OS 10.7.2 admin password, wrote it down, and now cannot find it!!!!!!  (I am the only user other than the guest account)  I am sunk.  Everything about my kids, my life & my work is on my MBPro!!  Is there anyway to reset the pass