[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Clustering tests and hsqldb
by ovidiu.feodorov@jboss.com
Tim wrote : For now though, could everyone ensure they run the clustering-tests target before committing after they run the normal test suite? Thanks
Why don't you add the clustering-tests target to "tests"?
Also, you can configure the default database on a test-by-test basis, by overriding the value of < property name="functional.tests.database" value="hsqldb" />. Override it when you call < antcall target="clustering-tests"/>
Scott wrote :
| What about just switching to another embedded database such as derby or javadb?
|
We can do that, but I have one question and one observation related to this.
The question is why JBoss AS doesn't use derby or javadb instead of hsqldb?
The observation is that the value of the database a certain tests runs in top of can be changed on a test-by-test basis, so by just having an MySQL instance in stand by and configuring the tests to run with "mysql" would be sufficient. We already need MySQL for stress tests, so this would be the simplest way to get address the problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982847#3982847
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982847
18 years, 2 months
[Design of JBossCache] - Re: Incorrect serialization of PojoCache collection class pr
by bstansberry@jboss.com
This can easily happen -- a pojo with a collection field gets put in the cache, and then some user code hands a ref to the collection to some other object, that object gets serialized (say as part of a response to a remote call); boom!
The case on the other forum post is a bit odd, as the serialization there is occuring due to cache replication itself. That's kind of a bad practice; they should aspectize all their classes. But I think we need to support the generic case where a Collection gotten from the cache gets serialized.
But, I don't think there's any need at all to try to maintain any object relationship or anything when the object is deserialized. So, this kind of thing should work fine:
Example is CachedListImpl:
| private Object writeReplace() throws ObjectStreamException {
| ArrayList toSerialize = new ArrayList();
| toSerialize.addAll(this);
| return toSerialize;
| }
|
toSerialize is what gets serialized. When deserialized, it's a List, as expected. If the user thought the deserialized list would somehow be the same object as something stored in a PojoCache somewhere (where???), they're not thinking right.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982846#3982846
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982846
18 years, 2 months