they are EJB options.
Please refer to the online documentation on how to customize jboss.xml
you can also look at the jbosstest xml files.
I also believe EJX has some support for it.
Basically, find the tag in the xml file and change from A to B
marc
|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Nortje, Andrew
|Sent: Monday, November 20, 2000 4:47 AM
|To: 'jBoss'
|Subject: RE: [jBoss-User] ejbLoad & ejbStore problem
|
|
|marc
|
|The options "A" and "B" you talk about, is that part of the J2EE spec or is
|it a JBoss spec. Either way I find it surprising that option "A" is the
|default behavior, after all this is ENTERPRISE Java which make the
|assumptions of "A" (IMHO) dodgy. In an "ENTERPRISE" one usually has all
|sorts of applications different accessing your data simultaneously from all
|over the place.
|
|Anyway, can you give me some pointers on how to setup jBoss for option B.
|
|Thanks
|
|Andrew
|
|-----Original Message-----
|From: marc fleury [mailto:[EMAIL PROTECTED]]
|Sent: Saturday, November 18, 2000 8:07 PM
|To: jBoss
|Subject: RE: [jBoss-User] ejbLoad & ejbStore problem
|
|
|Hello,
|
|this is the normal behaviour since the standard container configuration is
|the "A" option of commit, which means that we assume that the beans are the
|only living representation of the entity in db and the sole point
|of access.
|
|In your case you break that since you "manually insert SQL Plus" stuff,
|*you* are the second point of access ;-). You need to specify the "B"
|commit option for your beans if that is the case.
|
|What it does is that in the first case the container doesn't
|reload (he *is*
|the state holder) while in the second case he does reload on start of
|transaction.
|
|This is why you don't see your change.
|
|Bottom line: only point of Acess: OPtion A. Many points of access in DB
|option B
|
|marc
|
|
||-----Original Message-----
||From: [EMAIL PROTECTED]
||[mailto:[EMAIL PROTECTED]]On Behalf Of Nortje, Andrew
||Sent: Saturday, November 18, 2000 1:47 PM
||To: 'jBoss'
||Subject: [jBoss-User] ejbLoad & ejbStore problem
||
||
||I have an interesting ejbLoad and ejbStore problem. I have a number of
||session and entity beans deployed, all entity beans are bean managed. It's
||the age old shopping mall thing. So essentially I have a Customer session
||bean with a buy method. The buy method starts a transaction - I manually
||control the transactions. Everything works great, correct amounts are
||credited and debited, transactions are begun and committed.
||
||While testing, the customers account ran out of money, so I manually
||increased the balance using SQL Plus, we are using Oracle. I did
||remember to
||commit my update in SQL Plus (I have learnt my lesson). I then ran my test
||program again and kept getting an insufficient funds exception
||even though I
||had just updated the account balance manually. I finally figured out the
||following was happening.
||
||I did an ejbFind( ) which returned a new Account entity bean with the
||correct updated balance, which I had just updated in SQL Plus. jBoss then
||went and did an ejbStore() with an old Account bean instance in the pool,
||which had the old Account balance, and which then reset the balance.
||
||If the previous transaction committed successfully why does the container
||(jBoss) do an ejbStore. I should rather do an ejbLoad() or nothing at all.
||
||If I shutdown and restart jBoss there are no 'rogue' beans out there to
||'mess things up', obviously, and everything works fine. What am I doing
||wrong? I undestand transaction isolation can be quite complex. Do
|I need to
||set a transaction attributes for each method in my entity beans?
||
||The debug output from jBoss and my code is... as you can see the Balance
||should be 60 but is reset to 5
||
||[InternalAccount] New AccountBean
||[InternalAccount] New AccountBean
||[InternalAccount] ejbFind( entity ) InternalAccount
||com.uni.account.InternalAcco
||untBean@4204
||[InternalAccount] SQL: Select * from Account where ENTITY_ID=3 AND
||ACCOUNT_ORDE
||R = 0
||[InternalAccount] Result = org.jboss.minerva.jdbc.ResultSetInPool@b8a47
||[InternalAccount] Balance = 60.0
||[InternalAccount] ejbStore() InternalAccount
||com.uni.account.InternalAccountBean
||@524e3f
||[InternalAccount] InternalAccountBean ejbStore() called
||[InternalAccount] ID is 3
||[InternalAccount] SQL: Update Account set ENTITY_ID = 3, BALANCE =
||5.0 where
||ENT
||ITY_ID = 3
||[InternalAccount] SQL: Update Account set ENTITY_ID = 3, BALANCE =
||5.0 where
||ENT
||ITY_ID = 3 1 updated
||[Customer] Cart value = 55.0 Balance = 5.0
||[InternalAccount] ejbStore() InternalAccount
||com.uni.account.InternalAccountBean
||@524e3f
||[InternalAccount] InternalAccountBean ejbStore() called
||[InternalAccount] ID is 3
||[InternalAccount] SQL: Update Account set ENTITY_ID = 3, BALANCE =
||5.0 where
||ENT
||ITY_ID = 3
||[InternalAccount] SQL: Update Account set ENTITY_ID = 3, BALANCE =
||5.0 where
||ENT
||ITY_ID = 3 1 updated
||
||
||
||--
||--------------------------------------------------------------
||To subscribe: [EMAIL PROTECTED]
||To unsubscribe: [EMAIL PROTECTED]
||Problems?: [EMAIL PROTECTED]
||
||
|
|
|
|--
|--------------------------------------------------------------
|To subscribe: [EMAIL PROTECTED]
|To unsubscribe: [EMAIL PROTECTED]
|Problems?: [EMAIL PROTECTED]
|
|
|--
|--------------------------------------------------------------
|To subscribe: [EMAIL PROTECTED]
|To unsubscribe: [EMAIL PROTECTED]
|Problems?: [EMAIL PROTECTED]
|
|
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]