Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection PerformanceKiller
It makes sense to change the commit option for transactions for performance tuning. I have one Entity Bean that I think would fit option A better, and others that fit option B better. Can I customize each entity bean? I tried putting read-only to true on the one bean, but the container still loaded it before each transaction. (Option B). I don't want to change everything to option A. Thanks -Dennis On Fri, 2002-04-26 at 10:29, Dan Christopherson wrote: First, the re-fetch you see between your two tests is because of the commit option. Option B (default in 3.0) doesn't cache data between transactions, although the bean instances will be cached. If you aren't clustering and your data can't be modified from anywhere else, you can change standardjboss.xml to use Option A instead. As to why you need the user transaction, what kind of object are you calling from? If it's a client, well then you need a UserTransaction. If it's a session bean, then make sure your session bean's method is in a transaction with type of Required or RequiresNew. hth, danch Frank Morton wrote: If I wrap it with a UserTransaction, things look good, but I don't see why I would have to do so. And, if I do, I have many places where I will have to do the same thing, which I would like to avoid. Without wrapping in my own transaction, when trying to get a single property from a single element in the Collection, it loads the whole Collection. I don't understand why it would do it twice, let alone for each element in the Collection. I also don't understand if it is a function of the commit options, config or it is not working as expected. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user signature.asc Description: This is a digitally signed message part
RE: STILL TRYING: [JBoss-user] CMP: Iterate Collection PerformanceKiller
Yes, you can. Look at this http://www.jboss.org/online-manual/HTML/ch07s16.html alex -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dennis Muhlestein Sent: Monday, April 29, 2002 5:26 PM To: [EMAIL PROTECTED] Subject: Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection PerformanceKiller It makes sense to change the commit option for transactions for performance tuning. I have one Entity Bean that I think would fit option A better, and others that fit option B better. Can I customize each entity bean? I tried putting read-only to true on the one bean, but the container still loaded it before each transaction. (Option B). I don't want to change everything to option A. Thanks -Dennis On Fri, 2002-04-26 at 10:29, Dan Christopherson wrote: First, the re-fetch you see between your two tests is because of the commit option. Option B (default in 3.0) doesn't cache data between transactions, although the bean instances will be cached. If you aren't clustering and your data can't be modified from anywhere else, you can change standardjboss.xml to use Option A instead. As to why you need the user transaction, what kind of object are you calling from? If it's a client, well then you need a UserTransaction. If it's a session bean, then make sure your session bean's method is in a transaction with type of Required or RequiresNew. hth, danch Frank Morton wrote: If I wrap it with a UserTransaction, things look good, but I don't see why I would have to do so. And, if I do, I have many places where I will have to do the same thing, which I would like to avoid. Without wrapping in my own transaction, when trying to get a single property from a single element in the Collection, it loads the whole Collection. I don't understand why it would do it twice, let alone for each element in the Collection. I also don't understand if it is a function of the commit options, config or it is not working as expected. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: STILL TRYING: [JBoss-user] CMP: Iterate Collection PerformanceKiller
Frank Morton wrote: You have specified transaction-typeBean/transaction-type. Then I think you have to manually start and end the transaction. Do you do this? And I think you should use container for this option instead, and Required in the transaction-type of your methods. I am not starting/ending the transaction manually and I haven't been able to find a description how to do it. If you can point me at how to do that, I'd appreciate it. Thanks for your help. somthing like this in your ejb-jar.xml: container-transaction method ejb-namebeanName/ejb-name method-name*/method-name /method method ejb-namebean2name/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction I think required may be the default, or nothing? ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user