среда, 13 июля 2011 г.

How to build Swing forms with IntelliJ UI Designer (javac2) with Maven



<project> 
...
<packaging>jar</packaging>
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>ideauidesigner-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>javac2</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
<debug>true</debug>
<failOnError>true</failOnError>
...
</configuration>
</plugin>
</plugins>
</build>
</project>

Hibernate 3.6.5 Final Configuration/Session Factory Serialization

Deserialization of session factory drops exception cause it can't be deserialized without name, because the there are only name/uuid stored. Thus Session Factory can't be serialized in common sense. Result of serialization is reference to JVM instance or JNDI resource.

readResolve method in SessionFactoryImpl. Set hibernate.session_factory_name in properties.