I have my problem solved with this include as the lookup() of my DataSource works fine now thaks to the include you recommended.
But I find curious the fact that I have a Oracle datasource defined by my self and if I try to stablish the dependency on that DataSource on the -service.xml file that datasource isn't bound before the TreeCache setCache() method in the CacheLoader, as it should be. My DataSource is defined this way <datasources> | <local-tx-datasource> | <jndi-name>agorang/alarmMonitorDB</jndi-name> | <connection-url>jdbc:oracle:thin:@localhost_IP:PORT:SEQ9i</connection-url> | <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> | <user-name>123</user-name> | <password>xxx</password> | <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> | <blocking-timeout-millis>0</blocking-timeout-millis> | <idle-timeout-minutes>1</idle-timeout-minutes> | <max-pool-size>100</max-pool-size> | <min-pool-size>10</min-pool-size> | </local-tx-datasource> | </datasources> The "debug", when I include the dependency on my datasource looks like this: | 14:25:57,546 INFO [STDOUT] super setCache | 14:25:57,546 INFO [STDOUT] init() | 14:25:57,562 ERROR [main][agorang.helpers.MyCacheLoader] - javax.naming.NameNotFoundException: agorang not bound | 14:25:57,562 ERROR [MyCacheLoader] javax.naming.NameNotFoundException: agorang not bound | 14:25:57,562 ERROR [main][agorang.helpers.MyCacheLoader] - java.lang.NullPointerException | 14:25:57,562 ERROR [MyCacheLoader] java.lang.NullPointerException | 14:25:57,562 INFO [STDOUT] | cacheAllOperators(/pt/ptinovacao/agorang/catOperadores/) | 14:25:57,562 ERROR [main][agorang.helpers.MyCacheLoader] - java.lang.NullPointerException | 14:25:57,562 ERROR [MyCacheLoader] java.lang.NullPointerException | 14:25:57,562 INFO [STDOUT] setCache method succeeded. | 14:25:57,593 INFO [TreeCache] interceptor chain is: | class org.jboss.cache.interceptors.CallInterceptor | class org.jboss.cache.interceptors.PessimisticLockInterceptor | class org.jboss.cache.interceptors.CacheLoaderInterceptor | class org.jboss.cache.interceptors.UnlockInterceptor | class org.jboss.cache.interceptors.ReplicationInterceptor | class org.jboss.cache.interceptors.CacheStoreInterceptor | 14:25:57,593 INFO [TreeCache] cache mode is REPL_SYNC | 14:25:57,703 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=a | gorang/alarmMonitorDB' to JNDI name 'java:agorang/alarmMonitorDB' Note that the binding of the DataSource is done after is has been looked up wich causes the ERROR. I would like to be sure thad including the dependency on the DefaultDatasource all other DataSources are bound in time to be used by methods in CacheLoader classes. Thanks for your attention. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912892#3912892 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912892 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
