Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic Programming and user mkarg

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


Community

For many years I am using XSLT now for a lot of tasks in both, development and runtime environments: Source generation, creating HTML from XML data, or even rendering SVG vector graphics from XML finance data. But what really bothered me was that the XSLT transformer contained in Java (even in Java 6's latest release) was just able to do XSLT 1.0 but not XSLT 2.0. XSLT (and XPath) 2.0 comes with...
on Feb 6, 2010
Over the past decade, OpenSource became a big hype. At the peak of the hype, big stakeholders like IBM, Oracle and Sun (and even Microsoft and SAP) turned a lot of their previously proprietary code into OpenSource. While they tell us that they do it because they are so noble and like to exploit the community's knowledge, typically the open sourced software is only for free in part or is still...
on Dec 10, 2009

Databases

On last saturday I have run a few experimental benchmarks on the typical new generation technology stack (or part of it). What I exactly did was running iAnywhere 10.0.1 database and Sun Application Server 9 (aka "Glassfish" aka "Java EE 5 SDK") in a VMware Server 1.0.3 virtual machine on my private laptop (AMD Turion 64 X2, 2 GB RAM). The benchmark was done using a small test...
on Jan 3, 2010
I used my free day to do some more performance benchmarking using EJB 3.0 and WebServices. As I wrote in my last blog entry on this topic, I was astonished what performance is possible even in a VM on my cheat laptop. But now I invested some more time to tune my laptop (running JkDefrag gave its disk an amazing push) and do an optimization in the application itself: Using precompiled queries...
on Jan 3, 2010
I did some experiments with JPA, which is a really cool and simple API for entity persistence. In fact, writing an entity bean is as simple as writing a pojo plus adding some single annotations like @Entity and @Id (to identify the PK fields). That's it. Cool. :-) See this sample code: @Entity public class MySample { @Id private int x; public int getX() { return this.x; } public...
on Jan 3, 2010
JPA comes with a way of doing triggers, which is pretty cool: EntityListeners. It is a simple POJO that is annotated as EntityListener, and that gets linked to the triggering event by some outside glue. That outside glue can be an XML deployment descriptor (has nothing to do with the EJB 2.1 XML deployment descriptor; is nothing else but an override to the annotations found in the Java source...
on Jan 3, 2010

GUI

It took me several sleepless nights to find out, but finally I got it - and was astonished how easy it is. Ever wanted to play the default system sound for a specific operation? Well, in fact there is no platform independent solution for that (can't believe it, I know, but it is true). But at least Swing internally does it that way on the Windows platform (and on other platforms it will just do...
on Jan 3, 2010
Blue sky, 25°C, the ideal weather to solve strange JNI problems. So I spent another valueable free day to solve on of the mysteries of mankind: Why is my ShellExtension crashing? (For those who do not know what a Shell Extension is: In short you could say it is a custom icon in the Windows File Explorer, and I want to have it implemented in Java using JNI). Everytime XP's Windows...
on Jan 3, 2010

Education

Just found out how easy it is to use the full screen mode in Swing and certainly immediately must write down this blog entry. Using the full screen mode is just as easy as the sample shows: public final class FullscreenSample { public static final void main(final String[] args) throws Exception { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); final JFrame...
on Jan 3, 2010
Java 6 comes with SwingWorker as an integral part of the JRE (yes, you no more need to download it). And THAT version of SwingWorker can send progress status while the background work still is in progress. Using this new feature, it is possible to do a lengthy background operation that reports its status from time to time. For example: While loading thousands of rows from the server (which might...
on Jan 3, 2010
Attaching a GUI to a domain model object (a.k.a. "Entity") is a boring job. You need to write lots of synchronization code or models to change the UI when the entity changes and vice versa. Now that has an end. Here is the ultimate, automatic glue generator: The Java Beans Binding API. It allows you to glue together two Java Beans (i. e. POJOs, and has nothing to do with Swing or EJB)....
on Jan 3, 2010
Do you know EnumSet? No? Then you should take the time to look at this sample code. EnumSet allows writing of really eloquent Java source code. Run the following code and watch its result printed on the screen. Then check the below source code to find out how it works. The source code particulary makes use of (at least) the following features introduced in Java 5: enum keyword The enum keyword...
on Jan 3, 2010

Programming

Several APIs demand that the user is implementing the .hashCode() method. The reason is that these APIs are using hash based containers (like HashMap) to have a fast means of managing lots of objects (always comparing objects using .equals() would need endless time). There are lots of standard implementations on the web, so the question is, what performance impact the implemenation of .hashCode...
on Jan 3, 2010