Mails are not sending!!
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=83984 Posted on behalf of a User
Hi,
We are sending welcome mails to our customer after there registration, but for the past 10days the mail sending functionality is not working in the live server, but its working fine in the local server[testing server]. Is there any change required in jboss-ds.xml.
<min-pool-size>5</min-pool-size>
<max-pool-size>300</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
because our live server is throwing
"org.hibernate.SessionException: Session is closed!"
and
org.hibernate.exception.GenericJDBCException: Cannot open connection
ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: a01d914:a62e:49f5b615:19a195 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a01d914:a62e:49f5b615:19a195 status: ActionStatus.ABORTED >)
please help me to find a solution.
Thanks,
Rosario
16 years, 12 months
[JBoss Cache: Core Edition] - jdbc cacheloader configuration prgramatically
by sridhar_ratna
i am trying to configure jdbc cache loader dynamically.
but its giving ConfigurationException
public class CacheLoaderUtil {
| public static Node<String, Object> getCacheNode(int dataNodeNo) {
| Cache<String, Object> cache = createCacheFactory(dataNodeNo);
| cache.create();
| cache.start();
| return cache.getRoot();
| }
|
| private static Cache<String, Object> createCacheFactory() {
|
|
| Configuration config = new Configuration();
| config
| .setTransactionManagerLookupClass(GenericTransactionManagerLookup.class
| .getName());
| config.setIsolationLevel(IsolationLevel.READ_COMMITTED);
| config.setCacheMode(CacheMode.LOCAL);
| config.setLockAcquisitionTimeout(15000);
|
| EvictionConfig ec = new EvictionConfig();
| ec.setWakeupInterval(5);
|
| EvictionRegionConfig erc = new EvictionRegionConfig();
| erc.setRegionName("/");
| erc.setEventQueueSize(2000);
| erc.setEvictionAlgorithmConfig(new LRUAlgorithmConfig(300, 300, 500));
|
| List<EvictionRegionConfig> ercs = new ArrayList<EvictionRegionConfig>();
| ercs.add(erc);
| ec.setEvictionRegionConfigs(ercs);
|
| config.setEvictionConfig(ec);
|
| CacheLoaderConfig loaderConfig = new CacheLoaderConfig();
| loaderConfig.setPassivation(false);
| loaderConfig.setShared(false);
| loaderConfig.setPreload("/");
|
| JDBCCacheLoaderConfig jdbcConfig = new JDBCCacheLoaderConfig();
| jdbcConfig.setAsync(false);
| jdbcConfig.setCreateTable(true);
| jdbcConfig.setDriverClass(props.getProperty("Driver.Class"));
| jdbcConfig.setDropTable(false);
| jdbcConfig.setFetchPersistentState(true);
| jdbcConfig.setIgnoreModifications(false);
| jdbcConfig.setPurgeOnStartup(false);
| jdbcConfig.setTable("jbosscache");
| jdbcConfig.setPrimaryKey("jbosscache_pk");
| jdbcConfig.setFqnColumn("fqn");
| jdbcConfig.setFqnType("VARCHAR(255)");
| jdbcConfig.setNodeColumn("value");
| jdbcConfig.setNodeType(props.getProperty("Value.Type"));
| jdbcConfig.setParentColumn("parent");
| jdbcConfig.setJdbcURL(props.getProperty("Jdbc.URL"));
| jdbcConfig.setJdbcUser(props.getProperty("Jdbc.User"));
| jdbcConfig.setJdbcPassword(props.getProperty("Jdbc.Password"));
|
|
| loaderConfig.addIndividualCacheLoaderConfig(jdbcConfig);
|
| config.setCacheLoaderConfig(loaderConfig);
|
| CacheFactory<String, Object> factory = new DefaultCacheFactory<String, Object>();
|
| Cache<String, Object> cache = factory.createCache(config);
| return cache;
| }
|
|
| public static void main(String[] args) {
| CacheLoaderUtil.getCacheNode();
| }
| }
|
stack trace is
Exception in thread "main" org.jboss.cache.config.ConfigurationException: Unable to build interceptor chain
| at org.jboss.cache.factories.InterceptorChainFactory.construct(InterceptorChainFactory.java:229)
| at org.jboss.cache.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:315)
| at org.jboss.cache.factories.ComponentRegistry.invokeInjectionMethod(ComponentRegistry.java:276)
| at org.jboss.cache.factories.ComponentRegistry$Component.injectDependencies(ComponentRegistry.java:
| 974)
| at org.jboss.cache.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:252)
| at org.jboss.cache.DefaultCacheFactory.bootstrap(DefaultCacheFactory.java:155)
| at org.jboss.cache.DefaultCacheFactory.createAndWire(DefaultCacheFactory.java:141)
| at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:120)
| at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:105)
| at com.cmc.facts.util.CacheLoaderUtil.createCacheFactory(CacheLoaderUtil.java:126)
| at com.cmc.facts.util.CacheLoaderUtil.getCacheNode(CacheLoaderUtil.java:42)
| at com.cmc.facts.util.CacheLoaderUtil.main(CacheLoaderUtil.java:132)
| Caused by: org.jboss.cache.config.ConfigurationException: Unable to build interceptor chain
| at org.jboss.cache.factories.InterceptorChainFactory.construct(InterceptorChainFactory.java:229)
| at org.jboss.cache.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:315)
| at org.jboss.cache.factories.ComponentRegistry.invokeInjectionMethod(ComponentRegistry.java:276)
| at org.jboss.cache.factories.ComponentRegistry$Component.injectDependencies(ComponentRegistry.java:
| 974)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228917#4228917
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228917
16 years, 12 months