Monday, September 26, 2011

Mozilla update issue

Last month I discussed Thunderbird and Firefox update issues. After trying various different methods including Changing ownership and giving full permissions to the folders and sub-folders.

The only way I solved this annoying issue is by installing the latest version of Mozilla products from their website:

Sunday, September 18, 2011

Thunderbird Update issue

After I had the Firefox update issue last month, I have the same issue with Thunderbird now!

image

The Thunderbird version installed is

image

After working with Robert on Mozilla bugs it seems this might be an issue if Mozilla products are installed in some location other than <Program Files> folder in Windows 7. I have installed Mozilla products in other folders <not Program Files>

A point to note is even after changing permissions on the folder and running these products as Administrator I am unable to update.

Conclusion: Do not alter the default installation path of Mozilla products!

Wednesday, September 07, 2011

Groupon….just a bit too helpful

10 question, 11 answers!!

image

Friday, September 02, 2011

Test @Transactional annotation using log4j

 

The easiest way to test @Transactional annotations is using a logger. For example I have used log4j in this example.

In log4j.properties I turned up the logging of springframework to DEBUG level which is very verbose.

log4j.logger.org.springframework=DEBUG



The method is annotated to be @Transactional with no write back to the database and hence readOnly=true.



@Transactional(propagation= Propagation.REQUIRED, noRollbackForClassName="Exception.class", readOnly=true)
void method(){
}



And here are the magic logs which help me determine if the @Transactional annotation is working. I have used JUnit, EclipseLink JPA, Log4J and Netbeans for testing:-



2011-09-02 10:17:46 [main] DEBUG org.springframework.transaction.annotation.AnnotationTransactionAttributeSource     - Adding transactional method 'method' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly; ''
2011-09-02 10:17:46 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory     - Returning cached instance of singleton bean 'transactionManager'
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.JpaTransactionManager     - Creating new transaction with name [com.company.method]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly; ''
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.JpaTransactionManager     - Opened new EntityManager [org.eclipse.persistence.internal.jpa.EntityManagerImpl@43ad4a] for JPA transaction
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.JpaTransactionManager     - Initiating transaction commit
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.JpaTransactionManager     - Committing JPA transaction on EntityManager [org.eclipse.persistence.internal.jpa.EntityManagerImpl@43ad4a]
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.JpaTransactionManager     - Closing JPA EntityManager [org.eclipse.persistence.internal.jpa.EntityManagerImpl@43ad4a] after transaction
2011-09-02 10:17:46 [main] DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils     - Closing JPA EntityManager


Try it and enjoy the beauty of Spring :-)