Get a Quote

Your source for insights and trends in software development

Run Winston on JRE

Requirements Start the web-server ‘Winstone’ that will run any web-applications on user’s machine.   Problem During startup the server checks java-home directory, particularly file ‘tools.jar’. It seems where a problem is? But unfortunately (or luckily) not all users have installed JDK on their computers. And JRE doesn’t have this file.  Solution What should we do in this situation? It is simple. Download the source code from the web site and open it in any IDE (i prefer IDEA), than find…

Difference between ‘instanceof’ and Class.isAssignableFrom(…)

Sometimes it is necessary to determine the ownership of a specific instance of a class to a hierarchy of inheritance, as well as belonging to implement a specific interface. In Java, there are several approaches to solving this problem, from which we draw attention to the distinction between using the instanceof operator and Class.isAssignableFrom (Class <?> Cls) method. One of the main differences is that the use of instanceof operator can detect errors at compile time. Sample code that allows…

Postgres ENUM, Java ENUM and JPA

We have a postgres DB with postgres enums on one side and Java enums on the other. The question is – how to combine them together over JPA? The problem is in JDBC driver which returns Postgres enums as an instance of type PGObject. The type property of this has the name of postgres enum, and the value property its value (the ordinal is not stored however, so technically it’s not an enum anymore and possibly completely useless because of…

Installing glassfish with puppet

There are two major problems with installing glassfish through puppet in default configuration of puppetmaster: * The jar file of glassfish is too big * You have to accept sun lisense during the installation The cause of first problem is that by default puppetmasterd uses WEBRICK as it web-server. It would be probably not a problem if it was not using at the same time xmlrpc calls. The consequence of such configuration is that big files timeouts to be transfered….

Java Web Start on Google App Engine

Java Web Start is cool technology, which allows to automatically update client application to the latest version. So the latest client application is placed on server side. Unfortunately this technology does not work by default on Google App Engine. This post contains information about how to run it in the Google clouds. How Web Start checks updates? “How Web Start checks updates?” is the first question, which is occurred. The answer is simple (but I did not find it in…

About some testing tools

About some testing tools

Reasons for using testing tools during development: After each iteration of implementation you should always check that you have not spoiled/lost some old features. Running some set of test cases takes a lot time, so developers need to write unit and acceptance tests. But you can also use some well-known decisions for fast testing. Sometimes you need to reproduce bug which can occur only on peak load. It is the way to find some performance problem. So, some testing tools:…

GWT and Magnolia Integration

I like GWT and I like Magnolia. What do you think about link them? GWT will be responsible for dynamic pages. Such page will provide rich user interface with a lot of JavaScript and AJAX. Thus search engines will not index these pages, but it is not problem – Magnolia will be responsible for such pages. Also Magnolia provides some useful features like mail service, file uploading mechanism, etc. So let’s link them. Create GWT application First, we need to…

Erlang Code Replacement

Erlang supports change of code in a running system. Loading a code is handled by code server, just load a module by:  

or  

  when you are calling from another, existing erlang node. After this action both current (loaded) and old code are valid. The difference is that exported functions in old code are unavailable. Hence there is no way to make a global call to an exported function in old code, but old code may…

Key generation problem in Android Eclipse plugin

After installing a new MyEclipse and Android SDK on your Linux host you will probably run into the problem during key generation. This problem sounds like “Permission denied”. By default MyEclipse projects use JVM which is installed at <MYECLIPSE_PATH>/Common/binary/com.sun.java.jdk.linux.x86_1.6.0.013. It’s quite possible that the keytool which creates key to sign your Android application, is not allowed to execute. Just check if you have permission to execute keytool:ls -l <MYECLIPSE_PATH>/Common/binary/com.sun.java.jdk.linux.x86_1.6.0.013/jre/bin/keytool Probably you’ll have something like:-rw-rw-r– 1 andrey andrey 47447 2009-03-09 04:53…

First Erlang CMS

Maybe I’m wrong about first. But at least first that I tried and that easily started up and works 🙂 . The name is “Zotonic”. Authors are quite famous – Marc Worrell , Tim Bennings (http://timbenniks.nl/). What is surprising in this CMS is if you have already installed erlang and postgresql, it really works from just starting ./start.sh script, as it is uses inets internal erlang web-server (to be honest you still need to put password and user of your…

Ready To Take The Next Step?

quote Get a Quote

Sumbit your project request by special form.
We'll get to you promtly with our costing of your project.