Tuesday, February 21, 2006

DenyHosts

0 comments
Important tool for those that have SSH services available and want to reduce dictionary attacks.

Friday, February 10, 2006

Lazy Initialization + DAO + Hibernate + Spring?

0 comments
Check this blog out.

Don't forget that eager initialization is an option, but it will use an outer join!

Wednesday, February 08, 2006

Resistance

0 comments
It is easier to resist at the beginning than at the end. -- Leonardo da Vinci

Monday, February 06, 2006

Pagination and Hibernate

0 comments
Interesting way to do pagination in Hibernate. I have implemented using these available methods in Criteria class, but having a Page object may be more interesting.

Saturday, February 04, 2006

Java Concurrency

0 comments
Doug Lea's book on Java Concurrency never got updated, but soon a new book on this subject is to be released. The author's articles are very interesting, so I think we may expect this book to have a high quality.

Another book that may be interesting is Thinking Recursively with Java, that has been released recently.

Axis: WSDL styles and initialization exception

1 comments
Which style of WSDL should I use?

By the way, if you are using Apache Axis (1.2.1) and have NoSuchMethodException likes these below, don't worry. It prints out the stack trace, but it is only a leftover code that doesn't indicate any bug (since the object is correctly instantiated after this stack trace is printed):

java.lang.NoSuchMethodException:
org.apache.axis.encoding.ser.ArrayDeserializerFactory
.create(java.lang.Class, javax.xml.namespace.QName)

java.lang.NoSuchMethodException:
org.apache.axis.encoding.ser.ArrayDeserializerFactory
.(java.lang.Class, javax.xml.namespace.QName)

Another lesson from using Axis and Eclipse Webtools is that, as a default behaviour, it accepts either the operation name or the part name as the root element for an operation call. I mean, if you have an operation named "CalculateTest", declared like this:

<wsdl:operation name="CalculateTest">
<wsdl:input message="tns:CalculateTestRequest"/>
<wsdl:output message="tns:CalculateTestResponse"/>
</wsdl:operation>

It will accept a SOAP call with "CalculateTest" or "CalculateTestRequest" elements. If any given element is not found in the operations hash (what happens when the element matches the operation name), Axis will search for matching root elements of operations (in this case, CalculateTestRequest), and it will work.

MySQL: insert duplicate keys

0 comments
Very nice feature in MySQL 5.0. Basically the insert clause has an extension like this: "insert into ... on duplicate update a = b + c". Check the documentation.