Schlagwort-Archive: java

Find unused / unreferenced files in a large java-project folder

I am working on  a large Java software project consisting of .java files, Freemarker HTML templates (.ftl, .inc) and javascript files (.js). Over the years there are files around which are not referenced anywhere anymore. Mainly because developers have forgotten … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , | Kommentare deaktiviert für Find unused / unreferenced files in a large java-project folder

How to log Hibernate SQL statements including binding parameter values with Logback / SLF4J

When working with Hibernate as a Java ORM Framework,  SQL becomes kind of a black box for developers. This is fine in most cases and is exactly the purpose of such frameworks, but the time comes when you want to … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , | Kommentare deaktiviert für How to log Hibernate SQL statements including binding parameter values with Logback / SLF4J

Using Hibernate EventListeners to encrypt / decrypt properties of an entity based on other properties

Update 2012/07/24: It turns out my approach below is NOT GOOD! What I wanted to do is conditional encryption which is also asked in this Jasypt forum, where they say one should implement your own UserType. http://forum.jasypt.org/Hibernate-and-Conditional-encryption-td5586032.html The serious problem … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , , | Kommentare deaktiviert für Using Hibernate EventListeners to encrypt / decrypt properties of an entity based on other properties

How to use OAuth 2.0 authentication with Google’s GDATA Client Java Client Library

This article is for users who are using the Google Data Java Client Library (a.k.a. „gdata-java-client“) together with the Google API Client Library for Java (a.k.a. „google-api-java-client“). For our app we started the  integration with Google Spreadsheets today and we were running … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , , , , , | Kommentare deaktiviert für How to use OAuth 2.0 authentication with Google’s GDATA Client Java Client Library

How to add new gems to jruby in an Equinox OSGI Environment (or how to set jruby.home)

After I burned the midnight oil yesterday to debug into a problem I was having with getting the fastercsv gem to work with JRuby in my OSGI environment I decided to write a post about it and how I finally … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , , , , , | 132 Kommentare

Connection Failed with jconsole and Eclipse locally (macosx)

Thanks to Oli’s Blog entry about the same problem I had when I wanted to monitor my java program locally. The java class was started from within eclipse and then I started jconsole from command line. jconsole properly showed me … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , | 5 Kommentare

Rails-like configuration of different environments in JAVA – YAML instead of properties file

This article shows a simple code example how you can replace a standard JAVA properties file (.ini) with a more flexible .yml (YAML) file using the JYAML library. I used this to store configuration parameters for an application for different … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , , | 1 Kommentar

Initializing Hibernate without XML

This article just shows a code snippet I have used for initializing Hibernate in pure JAVA code without the hibernate.xml which you would normally use. public void start(BundleContext context) throws Exception { initHibernate(context); }   private void initHibernate(BundleContext context) { … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , | 2 Kommentare

Cassandra Distributed Database – a link list for beginners

I am currently playing around with Apache Cassandra (distributed database) and this article is to store all the links I have used before I close my browser with trillions of open tabs 🙂 http://wiki.apache.org/cassandra/GettingStarted http://wiki.apache.org/cassandra/ClientOptions http://prettyprint.me/2010/02/23/hector-a-java-cassandra-client/ http://wiki.apache.org/cassandra/DataModel Installing and using Apache Cassandra … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , , , , | 8 Kommentare

Java Code Snippet: Redirect System.out into a string

For a simple test application / prototype I just wanted to just dump everything from System.out into a String, which I can output somewhere e.g. in a JSP file so that I see what’s going on. And yes, I didn’t … Weiterlesen

Veröffentlicht unter Software-Development | Verschlagwortet mit , , | 2 Kommentare