Distribute JavaBean Events Across Java Virtual Machines
The JavaBean event model provides simple messaging, but it works only within a Java virtual machine (JVM). JMS allows you to send messages across a network to other JVMs, but it is quite complex. This article presents a quicker, simpler solution: transparently distributing JavaBean events over JMS.
by Eric Bruno
October 23, 2002
s a Java developer, sooner or later you will build a Java application that needs to communicate with another Java application. You can write Java network I/O code or use the Java Message Service (JMS) API to facilitate this communication. However, I've found both these approaches error prone and time consuming--I often had to rewrite and debug similar I/O or JMS code. So I came up with a better way, one as easy as coding to the JavaBean event model.
This article describes my approach to distributing JavaBean events across Java virtual machines. This approach transparently uses the JMS specification and extends JavaBean events across a LANeven the Internetwithout requiring any JMS-specific code within the event listener or the event source components. Because its main requirement is that both the listeners and sources extend an abstract base class, the approach also is non-intrusive.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!