Hello Gavin, please, provide more info (code snippets) on how the code from UI differs from testcases. I'll look at it.
Thanks, alex Saturday, June 28, 2003, 6:57:23 AM, Gavin Matthews wrote: GM> All, GM> This is a long shot and pretty sparse on detail but just incase someones GM> come across this before.... GM> I'm upgrading from 3.2.0 to 3.2.2RC1 but I'm now seeing a strange CMR GM> problem where by the foreign-key is not getting populated (sometimes). A GM> quick description of the senario, this is a mail app with recipients, GM> senders and packages. Recipients and senders are represented by PackageUser GM> beans and there's a CMR relationship with the Package bean (many to 1). This GM> is where things get strange - through the UI everything works absolutely GM> perfectly. However in our unit tests (cactus) I'm seeing a strange problem. GM> When I create a PackageUser it is associated with a Package (in GM> ejbPostCreate). What I'm seeing is that for the first PackageUser (the GM> sender) the association is working fine but the second (the recipient) is GM> not getting populated (i.e. the foreign key stays as NULL). Which means that GM> later on when I look at the package it has no recipients and causes a GM> failure. GM> Just to re-iterate, everything works fine through our UI and in 3.2.0 there GM> was no such problem. This makes me think there may be some issue with the GM> behaviour of CMR depending on the transactionality of the calls. Where does GM> JBoss handle the flushing of the data - are there any known issues in this GM> area (I had a look at the list and the bugs but nothing struck me as GM> similar). I've spent the day investigating and haven't gotten anywhere, any GM> suggestions would be appreciated. GM> I've attached the an excerpt from the server log. The interesting lines GM> are: GM> 2003-06-27 20:46:49,468 INFO ... ***************************************** GM> 2003-06-27 20:46:49,468 INFO ... CreateSender: PackageId=14 GM> 2003-06-27 20:46:49,468 INFO ... ***************************************** GM> ... GM> 2003-06-27 20:46:49,484 DEBUG GM> [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand.PackageUse GM> r] Executing SQL: INSERT INTO MessengerPackageUser (pickupKey, category, GM> expireTime, isSaved, recallTime, lifeCycleState, lifeCycleStateTime, GM> pickupTime, pickupState, pickupStateTime, streamPickupStates, address, GM> fullName, displayName, deliveryMethod, deliveryMethodOptions, GM> notifyOnDeliveryFailure, notifyOnPackageView, deliveryState, deliveryType, GM> deliveryStateTime, deliveryTime, packageId, folderId) VALUES (?, ?, ?, ?, ?, GM> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); SELECT GM> SCOPE_IDENTITY() GM> 2003-06-27 20:46:49,718 DEBUG GM> [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.PackageUser] GM> Executing SQL: UPDATE MessengerPackageUser SET packageId=?, folderId=? WHERE GM> packageUserId=? GM> 2003-06-27 20:46:49,734 DEBUG GM> [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.PackageUser] Rows GM> affected = 1 GM> ... GM> 2003-06-27 20:46:50,046 INFO ... ***************************************** GM> 2003-06-27 20:46:50,046 INFO ... CreateRecipient: PackageId=14 GM> 2003-06-27 20:46:50,046 INFO ... ***************************************** GM> ... GM> 2003-06-27 20:46:50,046 DEBUG GM> [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand.PackageUse GM> r] Executing SQL: INSERT INTO MessengerPackageUser (pickupKey, category, GM> expireTime, isSaved, recallTime, lifeCycleState, lifeCycleStateTime, GM> pickupTime, pickupState, pickupStateTime, streamPickupStates, address, GM> fullName, displayName, deliveryMethod, deliveryMethodOptions, GM> notifyOnDeliveryFailure, notifyOnPackageView, deliveryState, deliveryType, GM> deliveryStateTime, deliveryTime, packageId, folderId) VALUES (?, ?, ?, ?, ?, GM> ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); SELECT GM> SCOPE_IDENTITY() GM> Unlike the first insert the there is no corresponding update for the second GM> insert. Yet the trace message I added indicates that they where both created GM> with the same package (id==14), one succeed to create the relationship the GM> other didn't even try? Anyone seen anything like this before? Any ideas on GM> where I should be looking? GM> thanks, GM> gavin ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
