JRebel side effects?

While debugging a Spring/Hibernate-based web application I found this in the logs. Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access. Sounds as something […]

How to add AccessDescisionVoters to AccessDescisionManager in Spring Security

Here’s a pretty neat approach to add AccessDescisionVoters to the default AccessDescisionManager in Spring Security:

Source: http://forum.springsource.org/showthread.php?116830-How-to-add-voters-to-the-default-accessDecisionManager&s=1a6d05dedb0342570b900141a6d53d2e&p=386079#post386079

Convert Image to byte array in Java

If you don’t want to make use of IOUtils from Apache Commons Lang, you should you know, the code in the finally block would be something like

UnknownHostException with ‘%’ in IPv6 address

dnsjava to resolve whatever address request.getRemoteAddr() would return. This worked very well in most cases. However, in some cases I would see something like: [quote]java.net.UnknownHostException: Invalid address: fe80::1d9:b65a:ed86:7940%11[/quote] Not being much of a networking expert I was puzzled about the ‘%11’. Once again superuser.com came to rescue: http://superuser.com/questions/99746/why-is-there-a-in-the-ipv6-address