-
1. Re: Migration show stopper: Sticky database connections ?
starksm64 Mar 30, 2005 9:13 AM (in response to dkoon)File a bug report in jira with the datasource configurations and example usage of the datasource where the data gets mixed up.
http://jira.jboss.com/jira/browse/JBAS
Enable trace level logging on the org.jboss.resource category in the conf/log4j.xml to determine what is going on in the jca layer: -
2. Re: Migration show stopper: Sticky database connections ?
ckokotsis Mar 30, 2005 9:32 AM (in response to dkoon)quick suggestion that may be way off the mark but such behavior would occur as a result of ejb instances not having their member values re-initialised when retrieved from the instance pool.
eg>
1. retrieve instance of company bean from pool and populate with company A data.
2. passivate and return bean to instance pool
3. retrieve instance of company bean (previously populated with company A data) and populate with company B data.
if company B data partial, and subject to incorrect ejb coding, company bean B will have old values still populated from previous company A population. This will be seen after some time as bean instances within the pool are re-used.
Why u wouldn't see this b4 under web logic don't know. If this is the fix let me know. -
3. Re: Migration show stopper: Sticky database connections ?
adrian.brock Mar 30, 2005 12:41 PM (in response to dkoon)"scott.stark@jboss.org" wrote:
File a bug report in jira with the datasource configurations and example usage of the datasource where the data gets mixed up.
http://jira.jboss.com/jira/browse/JBAS
Enable trace level logging on the org.jboss.resource category in the conf/log4j.xml to determine what is going on in the jca layer:
<category name="org.jboss.resource">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
NO. HE SHOULD USE SEARCH OR READ THE DOCUMENTATION ABOUT JCA
SECURITY CONFIGURATION.
I answered this question earlier this month. I'm not going to repeat myself.
The purpose of this forum is not to repeatedly provide the same answers to lazy users.
Where's my "move redundant post to lazy users forum" button I have been asking for? :-) -
4. Re: Migration show stopper: Sticky database connections ?
adrian.brock Mar 30, 2005 1:10 PM (in response to dkoon)OK, I relented and added it to the FAQ, along with the other common error.
I doubt this will stop people still posting the question to the forums :-(
http://www.jboss.org/wiki/Wiki.jsp?page=FAQJCASubPooling -
5. Re: Migration show stopper: Sticky database connections ?
dkoon Apr 22, 2005 8:42 PM (in response to dkoon)It happens ckokotsis is correct. Our problem was due to an incorrect ejbLoad() coding where we did not refresh state after the first time the EJB was loaded.
The reason this incorrect ejbLoad() caused our symptom is that when user of
companyA signed in, JBoss went to cache/bean pool to get one existing
instance. It happened that there was a companyEJB available but it was used as
companyB before with companyB data. To change it to companyA, JBoss fired
ejbActivate() which in our code correctly assigned it the primary key of
companyA. Then JBoss fired ejbLoad() which in our code incorrectly refused to
reload data (because it loaded data once when it was first used as companyB).
Even though the key is companyA, the data is companyB!
The reason why this code had been working on the Weblogic side was likely due
to differences in EJB container implementation between the two application
servers. It seems like Weblogic does not trust programmers refreshing the
state in ejbLoad() that it resets all instance variables when it trys to reuse
an EJB from cache/bean pool. Anyway, if we would have coded ejbLoad()
correctly this symptom should have happened.
I fixed this problem on April 1st by forcing ejbLoad() to reload data everytime.
We tested it many times since and the symptom had disappeared.