Results 1 to 4 of 4

Thread: Accessing another .ear's POJOs

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Posts
    12

    Default Accessing another .ear's POJOs

    We have multiple applications deployed in the same app server in different .ear files that need to talk to each other. The current solution is a .properties file in the parent classpath that defines the properties needed to look up an EJB in the other .ear. It would be much faster and less code if we could just grab a hold of a POJO.

    What I would like to do is place a Spring context file in a parent classpath that one .ear could read and gain access to classes in the other .ear. I will admit I have not tried this because I am more in the theoretical thinking stage at the moment, but I do not see how app A could see the classes of app B.

    We could, of course, define a bean in the parent classpath that is a LocalStatelessSessionProxyFactoryBean, or use Hessian. Is this really the only solution? Does anybody have any good ideas for this scenario?

    Thanks,
    Michael.

  2. #2
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    You could also put the POJOs outside the EAR and put it in the global classpath. Then each EAR's context could use that context as a parent.

  3. #3
    Join Date
    Jul 2005
    Posts
    12

    Default

    Yeah, I thought of that too, but management would not approve because they like the idea of a single deployment unit for each application. They have the phantom requirement (a phrase I love from Rod's book and have come to realize there are many, many phantom requirements) that a single application might need to be picked up and moved to another server center.

  4. #4
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    Quote Originally Posted by mkoss
    Yeah, I thought of that too, but management would not approve because they like the idea of a single deployment unit for each application. They have the phantom requirement (a phrase I love from Rod's book and have come to realize there are many, many phantom requirements) that a single application might need to be picked up and moved to another server center.
    Then the only solution would be some remote call, because you never know when the application will move off to another server.

    Since this code is only suppose to live in one application, its not truly shared, so trying to use the POJOs although sounds like a good idea, makes your application coupling tighter than management is comfortable with.

Similar Threads

  1. Spring and JtaTransactionManager with POJO's
    By kshacks in forum Container
    Replies: 2
    Last Post: Mar 15th, 2010, 02:41 AM
  2. Business objects = pure POJOs?
    By jonmor in forum Architecture
    Replies: 4
    Last Post: Jun 7th, 2008, 08:13 PM
  3. Replies: 8
    Last Post: Jun 12th, 2007, 01:45 PM
  4. Replies: 7
    Last Post: Aug 11th, 2005, 05:25 AM
  5. Accessing two databases, one readonly
    By aaime in forum Data
    Replies: 1
    Last Post: May 19th, 2005, 08:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •