-
1. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 22, 2008 8:21 AM (in response to lovelyliatroim)Ill also add in that the JDBC pooling config with C3p0ConnectionFactory doesnt work out of the box with JbossCache 2.0GA. It complains about missing the DataSource class.
Just FYI,
LL -
2. Re: JDBCacheLoader & hot redeploy
manik Jan 22, 2008 9:01 AM (in response to lovelyliatroim)Are you referring to the http session or EJB session cache? Or are you directly using the cache from your application?
-
3. Re: JDBCacheLoader & hot redeploy
manik Jan 22, 2008 9:02 AM (in response to lovelyliatroim)re: pooling, is this still using AS5? Just wondering why you would use the C3p0 conn pooling instead of the JBoss AS conn pooling.
-
4. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 22, 2008 10:07 AM (in response to lovelyliatroim)
re: pooling, is this still using AS5? Just wondering why you would use the C3p0 conn pooling instead of the JBoss AS conn pooling.
Yeh using AS 5.0 Beta 3. I ended up using the AS connection pooling in the end but i was mucking around and wanted to get set up as quick as possible so it was easier/quicker to put in the C3po properties to get pooling to work for me, except it didnt ;).
Are you referring to the http session or EJB session cache? Or are you directly using the cache from your application?
Its my own application specifc cache!!
Cheers,
LL -
5. Re: JDBCacheLoader & hot redeploy
manik Jan 22, 2008 3:22 PM (in response to lovelyliatroim)How do you create the cache? Do you do so programmatically in your application? Or is it via a -beans.xml or mbean service file?
-
6. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 23, 2008 3:19 AM (in response to lovelyliatroim)
How do you create the cache? Do you do so programmatically in your application? Or is it via a -beans.xml or mbean service file?
MBean service file!! -
7. Re: JDBCacheLoader & hot redeploy
manik Jan 23, 2008 7:37 AM (in response to lovelyliatroim)Just trying to ascertain where the cache lifecycle is controlled (and what calls start, stop, etc). Thanks for this info, will investigate.
-
8. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 23, 2008 8:20 AM (in response to lovelyliatroim)Just so you know the hot-deploy isnt working 100% in Beta3 i.e when you touch the .xml files JBoss AS doesnt pick it up that it has changed. I touch the whole directory(I have exploded ear and touch the ear dir to get JBoss AS to kick off a hot-redeploy).
Just so you know!! -
9. Re: JDBCacheLoader & hot redeploy
manik Jan 23, 2008 8:25 AM (in response to lovelyliatroim)Very useful for the AS forums - I suggest you post that comment there.
-
10. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 23, 2008 8:51 AM (in response to lovelyliatroim)I already did, they know about it!!
-
11. Re: JDBCacheLoader & hot redeploy
manik Jan 23, 2008 11:29 AM (in response to lovelyliatroim)"lovelyliatroim" wrote:
Just for your information.
Using JBoss AS 5.0 Beta 3 and JBoss Cache 2.0. Im using the JDBCCacheLoader, when i do a hot-redeploy my database gets purged. This does not happen when i shutdown and restart.
And my attribute purgeOnStartUp is set to false.
I tried this very briefly, and it worked fine. Hot-redeploy meaning, touching the -service.xml file that defined the cache, correct?
Can you confirm that you do not havecache.jdbc.table.drop=true
in your JDBCCacheLoader properties? -
12. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 24, 2008 3:55 AM (in response to lovelyliatroim)My config looks like so
<attribute name="CacheLoaderConfig" replace="false"> <config> <!-- are the cache loaders shared in a cluster? --> <shared>false</shared> <async>true</async> <fetchPersistentState>false</fetchPersistentState> <ignoreModifications>false</ignoreModifications> <purgeOnStartup>false</purgeOnStartup> <cacheloader> <class>org.jboss.cache.loader.JDBCCacheLoader</class> <properties> cache.jdbc.datasource=java:/cmdsDB </properties> </cacheloader> </config> </attribute>
Just to give you and idea on my ear package, might have something to do with that
+cmds.ear
+cmds-cache.jar
+meta-inf
+cmdsNonPersistenCache-service.xml
+meta-inf
+cmdsPersistentCache-service.xml
+webapp.war
+common.jar
Just in case directory structure is important, there are 2 things i know that are wrong and havent changed yet. 1. Is why 2 service files in 2 different directory structures?? Well apparently you can only have one-service file in your meta-ing directory, at the moment i have 2 seperate cache configs one for a persistent cache and for a non persistent cache.(Will take out the non persistent config cache and see if this is having an effect, will let you know). 2nd thing wrong is that my cmds-cache.jar should be called cmds-cache.sar but the deployer is still picking up the service file and deploying it so i havent bothered to rename!!
What is you directory structure looking like?? -
13. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 24, 2008 4:03 AM (in response to lovelyliatroim)
I tried this very briefly, and it worked fine. Hot-redeploy meaning, touching the -service.xml file that defined the cache, correct?
I touch the ear directory not the service file !!
Damn indentation didnt come through last time, ill try again+cmds.ear +cmds-cache.jar +meta-inf +cmdsNonPersistenCache-service.xml +meta-inf +cmdsPersistentCache-service.xml +webapp.war +common.jar
-
14. Re: JDBCacheLoader & hot redeploy
lovelyliatroim Jan 24, 2008 4:19 AM (in response to lovelyliatroim)
Will take out the non persistent config cache and see if this is having an effect, will let you know)
Makes no difference, still purges DB