tags:

views:

123

answers:

2

Hi,

I have a unique problem in RAD7 (WAS 6.1.1). We have two same applications but different versions, running on the same server(deployed two ear's). When a user logs in both the application simultaneously and tries some action, the functionality(ies) of older version and newer versions are combined and it behaves randomly. Is it something to do with a single JVM using a common object pool for both application versions or...

I am befuddled..Help

Thanks and regards, dj

A: 

I'm not 100% sure why you have the same app on the same server... but think of it this way:

Both applications register against a certain context (i.e.: /myApp/) and they're both active on the server. Which one is supposed to act whenever a request comes in? This is one of those "the computer has no way of knowing what you really want to do" situations. Since both applications are actually performing actions, it sounds like a race condition between both applications. Sometimes one app wins, sometimes the other wins.

You -really- shouldn't have both of those applications on the same server.

Malaxeur
Both the apps are same but differ in version with some additional functions in the newer one. They both use same server resources so may be it is that , the objects versioning doesnt happen or is not possible for the 2 different apps to pick up accordingly.i.e. java objects will have same names , dbAccessTab1 will have two copies sitting in the JVM ? is it even possible. If it is, may be JVM Heap storing these will not do selective decision as to which one to pick for a request coming from app1 or app2....The context are defined different for both, so that part is fine I guess.
Deepak
i forgot to thank you though for muscling out your opinion..it helps a lot to get some seasoned player...:-)
Deepak
I'd assume they'd be under different Class Loaders, but my knowledge of that space is limited. You say the app behaves randomly... can you expand on that? For example, is old code getting invoked or is it crashing?
Malaxeur
Theoretically, two applications living in different spaces should be fine: consider the case where you have two applications using some jar file (i.e. apache commons) of different versions. Both apps are expected to run fine.
Malaxeur
"You say the app behaves randomly... can you expand on that? "The application version 2 uses the old code which is for app ver 1.
Deepak
A: 

Deepak,

The info you have provided is not sufficient (does not provide adequate info to help us help you)

The default behavior for each application (EAR) on WAS is to have it own classloader, except for some which could be part of the server's classloader.

What does the application use? Is it only a web app with POJOs or does it use EJBs too?

Do you use any shared libraries that are defined at the server level?

What does login to the applications mean? If the user logs in to one application and the SSO is turned on, the user will not be challenged to log into the second application (assuming it is the same domain - as the LTPA token is available from the first login.

Please provide additional info.

Manglu

Manglu