advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
The Java Message Service (JMS)
Do you think Sun should extend the JavaBean event model to allow for simple inter-JVM communication, as this article outlines?
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

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. 


advertisement
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 LAN—even the Internet—without 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?



advertisement