Caching of collections isn't working how I would expect. I had a TaskTypeEntity which has an AttrTypeEntity which in turn has AttrDef. I placed cache markers on all entities and on the collections of AttrTypeEntity. When I changed an AttrDef, the cached copy in the AttrTypeEntity collection wasn't updated.
Need to find out how the cache works exactly.
Tuesday, March 31, 2009
Tuesday, March 24, 2009
Monday, March 23, 2009
Viewing Deadlocks in Sql Server
Go to Sql Profiler
New Trace
Events Selection -> Locks -> Choose Deadlock graph and DeadLock chain
Run
Search for word deadlock
New Trace
Events Selection -> Locks -> Choose Deadlock graph and DeadLock chain
Run
Search for word deadlock
Thursday, March 19, 2009
Vertical Panel "spreads things out"
If I add things to a Vertical Panel, like 2 labels, they end up not exactly one after the other - they are spread out to take up the whole space - how can I change that?
Ans - you can work around this problem by setting cell heights of children widgets to "1%"
Ans - you can work around this problem by setting cell heights of children widgets to "1%"
Wednesday, March 18, 2009
Change default jdk platform in NetBeans
Edit the property netbeans_jdkhome in netbeans\etc\netbeans.conf
Thursday, March 12, 2009
SNP Load Testing Adventures
Ran 20 threads all at the same time with default cache settings - takes 65 secs.
When I changed entity cache to use OPTIMISTIC locking (it uses pessimistic by default) it seemed to make a difference when I hot-changed the cache file, but not from after a restart. After a restart there were lots of exceptions like
After restart optimistic cache - 20 simultaneous requests - 60sec
After restart optimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec
After restart pessimistic cache - 20 simultaneous requests - 45sec
After restart pessimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec
When I changed entity cache to use OPTIMISTIC locking (it uses pessimistic by default) it seemed to make a difference when I hot-changed the cache file, but not from after a restart. After a restart there were lots of exceptions like
2009-03-12 18:43:10,875 WARN [org.jboss.cache.interceptors.TxInterceptor] Rolling back, exception encountered
Caused by: org.jboss.cache.optimistic.DataVersioningException: Tx attempted to create /sa_XmTaskMgrInternal-ejb_jar,Xmotion/au/com/xmotion/xmattribute/ejb/orm/AttrValue/au.com.xmotion.xmattribute.ejb.orm.AttrValue#87616 anew. It has already been created since this tx started by another (possibly remote) tx.
After restart optimistic cache - 20 simultaneous requests - 60sec
After restart optimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec
After restart pessimistic cache - 20 simultaneous requests - 45sec
After restart pessimistic cache - 20 simultaneous requests with 20sec rampup period - 16sec
Monday, March 9, 2009
JAXB printing xs:date as xs:datetime
For xs:date element, the automatic xml it created for a java date object came out as a datetime element. I tried to use custom binding but this didn't work. Hack I found around it was
tripDate.clear();
tripDate.setDay(cloneDate.getDay());
tripDate.setMonth(cloneDate.getMonth());
tripDate.setYear(cloneDate.getYear());
tripType.setTripDate(tripDate);
It then printed it out correctly
tripDate.clear();
tripDate.setDay(cloneDate.getDay());
tripDate.setMonth(cloneDate.getMonth());
tripDate.setYear(cloneDate.getYear());
tripType.setTripDate(tripDate);
It then printed it out correctly
Monday, March 2, 2009
Properties in Python
Can set a property like this
class Group(db.Model):
name = db.StringProperty()
description = db.TextProperty()
@property
def members(self):
return Contact.gql("WHERE groups = :1", self.key())
What is that ampersand notation?
class Group(db.Model):
name = db.StringProperty()
description = db.TextProperty()
@property
def members(self):
return Contact.gql("WHERE groups = :1", self.key())
What is that ampersand notation?
Subscribe to:
Posts (Atom)