[JBossCache] - pojocache prevent updates during replication
by dh717
I'm running pojocache 2.0.0 CR3 in a standalone two node active/hot-standby cluster and I'm running into problems when brining up the second node (the hot-standby). I'm using the replySync-service.xml configuration from the example code (using TCP instead of multicast UDP). The active node is updating the cache frequently (about once per second). When the hot-standby node comes online, the active node will almost always throw a TimeoutException during the state transfer because it will continue updating the cache during the state transfer. The interleaving of the cache update and the state transfer appears to cause a deadlock, which results in the TimeoutException being thrown. The replicated state is fairly small (a Map<String, String> with less than 100 entries). I registered a custom @CacheListener class that listens for ViewChanged events and prevents the active node from writing to the pojocache for the next five seconds and the problem seems to have gone away. Is there a better way to do this? Is there any way to hook into the underlying replication code to prevent cache operations during replication? Are there any configuration settings that can be used to prevent cache operations during replication?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065239#4065239
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065239
18Â years, 11Â months
[JBoss Seam] - Re: SEAM JEE5 Example w/MySQL Question
by nwhite
Well, when I said that was the last entry in the app server log I was mistaken. Looks like the buffer hadn't flushed in my tail. Applogies, here is a sample of the problem in the logs -
[#|2007-07-17T22:24:05.970-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:05,970 INFO [SettingsFactory] Default entity-mode: pojo
|#]
[#|2007-07-17T22:24:06.010-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,010 INFO [SessionFactoryImpl] building session factory
|#]
[#|2007-07-17T22:24:06.490-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,490 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
|#]
[#|2007-07-17T22:24:06.510-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,510 INFO [SchemaExport] Running hbm2ddl schema export
|#]
[#|2007-07-17T22:24:06.510-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,510 INFO [SchemaExport] exporting generated schema to database
|#]
[#|2007-07-17T22:24:06.551-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,541 ERROR [SchemaExport] Unsuccessful: create table Booking (id bigint not null auto_increment, checkinDate date not null, checkoutDate date not null, creditCard varchar(16) not null, smoking bit not null, beds integer not null, creditCardName varchar(70) not null, creditCardExpiryMonth integer not null, creditCardExpiryYear integer not null, user_username varchar(15) not null, hotel_id bigint not null, primary key (id)) ENGINE=InnoDB
|#]
[#|2007-07-17T22:24:06.551-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:06,551 ERROR [SchemaExport] No database selected
|#]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065236#4065236
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065236
18Â years, 11Â months
[JBoss Seam] - SEAM JEE5 Example w/MySQL Question
by nwhite
Hi,
My setup looks like this:
* Sun Java System Application Server 9.1 (build b41d-beta2) [GlassFish V2 beta2]
* Seam 2.0.0 beta 1
* MySQL 5.0.45
* MySQL Connector/J 5.0.6
I successfully built and deployed the included JEE5 example application, after some minor tweaks to the web.xml, thanks to a previous post I found in this forum. This deployed using the bundled Derby db and persistence.xml configuration.
I am now trying to get it to run using MySQL instead but when I deploy the EAR I am not seeing the tables automatically created in the new db.
Prior to deployment under this environment I did the following steps:
Undeployed old app
Stopped SAS
Dropped in the mysql connector J jar into the SAS lib dir
Started default SAS domain
Created a new user, mysqltestuser, and a new database called mysqldatabasetest in MySQL.
Using the SAS AdminConsole:
Set up a MySQL connection pool using the com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource data source class name and the javax.sql.ConnectionPoolDataSource Resource Type. I pointed things at a new database using the new user and password and I am able to 'ping' the connection using the SAS Ping button.
Set up a JDBC Resource, jdbc/__mysqltest using the above pool.
Changed the persistence.xml file and pointed jta-data-source from jdbc/__default to jdbc/__mysqltest and changed the value of hibernate.dialect to org.hibernate.dialect.MySQL5InnoDBDialect
ant clean
ant glassfish
Using SAS AdminConsole deployed new ear file
Look at db and I don't see any tables created.
The last line in the server log file is:
[#|2007-07-17T22:24:05.068-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|22:24:05,068 INFO [Ejb3Configuration] [PersistenceUnit: bookingDatabase] no META-INF/orm.xml found
|#]
Thoughts?
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065233#4065233
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065233
18Â years, 11Â months
[Management, JMX/JBoss] - Deploy MBean service get No ClassLoaders found exception
by loseyourself
Greetings all,
I am using JBoss 3.2.5 to implement a mail listener and deploy it as an MBean service. I follow the sample of HelloWorld mbean service tutorial on the wiki site,
1. create an interface:
public interface TopicMailListenerMBean extends ServiceMBean{
public String getName();
public void setName(String name);
public String getUrl();
public void setUrl(String url);
public void disconnect() throws JMSException;
}
2. create mbean class:
public class TopicMailListener extends ServiceMBeanSupport
implements MessageListener, TopicMailListenerMBean {
public void onMessage(Message msg) {...}
...
}
3. create a jboss-service.xml
<?xml version="1.0" encoding="UTF-8"?>
10.65.240.244:1099
topic/testTopic
4. deploy the war to jboss, and rename it to .sar, the hirarche of the sar is:
test.sar
test.sar/META-INF/jboss-service.xml
test.sar/au/gov/nsw/community/mail/TopicMailListener.class
test.sar/au/gov/nsw/community/mail/TopicMailListenerMBean.class
Now, once I deploy the .sar in the JBOSSHOME/server/all/deploy, I always get following exceiption:
2007-07-18 12:33:05,640 DEBUG [org.jboss.system.ServiceCreator] About to create bean: au.gov.nsw.community.mail:service=TopicMailListener with code: au.gov.nsw.community.mail.TopicMailListener
2007-07-18 12:33:05,671 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/D:/Adobe/LiveCycle/jboss/server/all/deploy/Docs.sar
org.jboss.deployment.DeploymentException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
at org.jboss.system.ServiceController.install(ServiceController.java:198)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: au.gov.nsw.community.mail.TopicMailListener
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:275)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:843)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:290)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:317)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
... 32 more
Could anybody tell me where is wrong? I do appreciate for any help in advance!
Cheers,
hj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065231#4065231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065231
18Â years, 11Â months