Archiv der Kategorie ‘Java‘

Accessing the Java Printing API using JRuby

Montag, den 5. April 2010

If you ever have to print a document from a Ruby app you might want to consider using JRuby to access the Java Printing API.Here is a small example accessing the API, looking up the printers and printing out their names to the console: The output looks like this: Anzahl der Drucker: 1HP Photosmart 8000 series

Hibernate – No CurrentSessionContext configured

Freitag, den 20. November 2009

If you encounter an error like: org.hibernate.HibernateException: No CurrentSessionContext configured! you probably want to add this line to your hibernate.cfg.xml <property name=”hibernate.current_session_context_class”>thread</property>