[jbosscache-dev] Alternatives to using AS DataSource remotely? - it caused me some headaches today :(

Galder Zamarreno galder.zamarreno at jboss.com
Wed Jan 17 15:07:34 EST 2007


After a bit of a fight, I have managed to run unsuccessfully JDBCCacheLoaderTest accessing the AS datasource remotely. The tests were failing with JBoss Serialization and not with Java Serialization.

After a bit of thought and discussion with Clebert, my gut feeling started to tell me that using the DataSource remotely was probably influencing the errors reported with JBoss Serialization.

I then took one of the tests and put it in a SAR and deployed in AS with the new JBossCache. I run the one of the failing tests via the MBean interface with jboss serialization on and it worked fine.

What does this tell me? Until we're not able to run the JDBCCacheLoaderTest inside the AS, we're not gonna be able to confirm that JDBCCacheLoader works fine inside AS. Besides, some of the tests use transactions and it'd be ideal to use JBoss TransactionManager for that.

This is important for the work I'm doing so that I can confirm I haven't broken anything anywhere else while introducing C3P0 connection pooling, so 3 choices here:

1) HACK, UGLY and everything bad u can think of!!! Create a SAR that contains all the tests in JDBCCacheLoaderTest and parent and check manually the logs. uuuuggghhhhh

2) Start up a mini App Server (JNDI, JDBC Connection Pooling, TransactionManager). If the JNDI was started locally from the unit test, I could potentially plug the Hypersonic DataSource and JBoss Transaction Manager and I could run the tests very easily and confirm that it works. Have you done this? Do you see it feasible? I might be able to use EJB3 standalone to provide a small container for this...

3) Create some kind of SAR that is deployed in a running AS and runs the test. I used to do this using Cactus in my previous work but didn't like it at all. Quite ugly as well.

Any other opinions?

p.s. Clebert, thanks for your help today :)

Cheers,

Galder Zamarreño
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat

IT executives: Red Hat still #1 for value http://www.redhat.com/promo/vendor/


Galder Zamarreño
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat

IT executives: Red Hat still #1 for value http://www.redhat.com/promo/vendor/





More information about the jbosscache-dev mailing list