JBoss migration – Quartz

This is a continuation of the previous article regarding some migration points (1, 2) from JBoss 4.2.2-GA to JBoss 7.1.1 and, presumably, Tomcat 7. 3. Quartz Quartz migration has been the simplest of all, by far. 3.1 JBoss 4.2.2 In JBoss 4.2.2 Quartz was configured using a MBean with a simple configuration: <pre lang="xml"> <?xml version="1.0" encoding="UTF-8"??> <server> <mbean code="org.quartz.ee.jmx.jboss.QuartzService" name="user:service=QuartzService,name=QuartzService"> <depends>jboss.jca:service=DataSourceBinding,name=XOracleDS</depends> <depends>jboss.web.deployment:war=/X</depends> <attribute name="Properties"> org.quartz.scheduler.instanceName = DefaultQuartzScheduler org.quartz.scheduler.rmi.export = false org....

July 20, 2012 · len

JBoss migration – the HAR archive

This is a continuation of the previous article regarding some migration points from JBoss 4.2.2-GA to JBoss 7.1.1 and, presumably, Tomcat 7. 2. The HAR archive The HAR archive was a nice mechanism which allowed hibernate integration. A ${name}.har file was created, containing all the mappings (*.hbm.xml) and data classes (*.class), allong with a hibernate-service.xml (later renamed to service-hibernate.xml in JBoss 5). This took care of creating the SessionFactory and making it accessible through JNDI....

July 20, 2012 · len

JBoss migration – the data source

I have spent a lot of time lately trying to create a migration plan for an application currently running on JBoss 4.2.2. Since this application development started a few migration attempts to newer versions of JBoss have been done (see for 5.1) but as it seems each version has different style configuration files and this application is expected to have a long lifetime the work seems a bit futile so in parallel of...

July 20, 2012 · len

To migrate or not to migrate

This is not a guide, nor intended to help, it’s a steam valve for my efforts to migrate an application to jboss 7 as each exception can take minutes or hours to solve without altering the original code. Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119) at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82) at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80) at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotation Information(MethodAnnotationAggregator.java:58) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.ha ndleAnnotations(InterceptorAnnotationProcessor.java:85) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.pr ocessComponentConfig(InterceptorAnnotationProcessor.java:70) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.de ploy(InterceptorAnnotationProcessor.java:55) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more Caused by: java....

June 23, 2012 · len

Long hibernate transactions

This is just a short reminder to the cause and solution of the following exception (hibernate + jboss 4.2.2 GA + oracle 10): 2012-02-09 13:09:50,333 ERROR [Thread-3-org.hibernate.AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) java.lang.NullPointerException at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:176) at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225) at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:136) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:340) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:107) at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:230) at com.arjuna.ats.arjuna.coordinator.TransactionReaper.check(TransactionReaper.java:202) at com.arjuna.ats.internal.arjuna.coordinator.ReaperThread.run(ReaperThread.java:107) 2012-02-09 13:09:50,339 WARN [Thread-3-com....

February 9, 2012 · len

A bit more about hibernate cache, when the cache hurts

I have learned a lot about hibernate cache at the time I wrote the previous article on this subject and this brings also an interesting detail. You are using the query and second level cache. Here is an interesting sequence: 1. You execute a query which returns items of entity A. First time it takes some time. 2. You execute the query again, it takes much less time, you are very happy :)...

February 9, 2012 · len

Enable ehcache debug in jboss

I’ve been trying to setup ehcache clustering in JBoss and unless there is a problem I’ve noticed there is little logging involved. So enabling logging should be a straightforward operation, I said. And it sure is if you bother to consider that the default ehcache distribution uses slf4j which is packed only with the jdk logger. So by default no matter how much you configure log4j no logging will be done....

November 9, 2011 · len

Air versus native Android applications

This weekend was cloudy and it rained so I decided to give some more time to play with my android phone. Even since I got the phone some time ago I tried on several occasions to do some fun development on it but it never seemed quite fun as expected so beside some play with the sensors, gps and camera I did not do much. However this time I was decided to do a different kind of test....

July 3, 2011 · len

FB4 on linux

Since 01.01.2011 Adobe has stopped support for Flex Builder 3 alpha on Linux. After this date the plugin effectively stopped working even if you had a valid, payed license as it was my case. This was a very sad news since I do a lot of flex development. I don’t need much of the Builder since I use ant for the compilation but at least code completion in .as and ....

January 7, 2011 · len

Android, what to expect as a developer

The reason why I haven’t wrote much here on the blog lately is that since I’ve got my android phone I’ve spent most of the free time tinkering with it. And by tinkering I mean developing simple applications and learning the framework. From my perspective spending a few hours coding something which in the end makes a simple (and some might say stupid) blink on the screen is way more entertaining than playing AngryBirds or Teeter....

December 5, 2010 · len