Wednesday, May 21, 2008

First and Only Java CAPS Book is Available

Sun's Michael Czapski has recently published a book about Java CAPS. As far as I know that is the very first book about the subject, it covers the product deeply by showing how to implement common integration design patterns. I hope I can buy a copy soon, it should be available through Amazon.

stcqueueviewer: Dinamically Monitoring JCAPS JMS Server Queues

Disclaimer: the below procedure is undocumented and not officially supported, so you are using this at your own risk only. Please contact Sun's JavaCAPS support or Professional Services for more

I recently had to dynamically monitor some JMS queues within JavaCAPS , especially my need was to count the number of messages in a given queue before posting additional messages, to avoid unnecessary queue flooding. JavaCAPS is fully JMX compliant, the embedded Sun Application Server is well-documented on that side but the SeeBeyond IQ Manager (default JavaCAPS' JMS server implementation) is lacking some info, so I decided to go for some hacking.
My colleague Paul pointed me in the right direction, he suggested to have a look at the com.stc.jms.stcqueueviewer.jar contained into
logicalhost\is\stcms\lib
This library is almost undocumented, so I had to reverse-engineer its classes by using the nice DJ tool. The most interesting file is called Server.java, the Server class contains what is necessary to fully monitor the SeeBeyond IQ manager from a Java program. Below an example:

package queuemonitor;

import com.stc.jms.queueviewer.*;

public class Main {

public static void main(String[] args) throws Exception {

Server sv = new Server();

sv.connect("localhost", 18007, "Administrator", "STC");

QueueStatistics queueStatistics = new QueueStatistics();

sv.getQueueStatistics(queueStatistics, "qStoreDocument");
System.out.println("MinSeqNo=" + queueStatistics.MinSeqNo);
System.out.println("MaxSeqNo=" + queueStatistics.MaxSeqNo);
System.out.println("MessageCount=" + queueStatistics.MessageCount);
sv.disconnect();
}
}

To compile and run this with Netbeans 6 you need to import some additional JAR files from the JavaCAPS Logicalhost logicalhost\is\stcms\lib folder:
  • com.stc.jms.stcjms.jar
  • com.stc.jms.stcqueueviewer.jar
  • jms.jar


By the way, if you have not tried the new Netbeans 6 yet, then shame on you!

If you want instead to do the same within a JavaCAPS JCD you need to execute the following steps:
1. create a new JCD
2. Import the com.stc.jms.stcqueueviewer.jar JAR file into repository
3. Import the above JAR into the JCD


4. Do something useful with the dynamic information you get


The above JCD example is pretty silly, just to show you something

That's it. There other useful methods into Server class, you can explore and discover other interesting things. Hopefully somewhere more queueviewer's documentation is available, so it won't be necessary to decompile the Java classes...

Saturday, March 29, 2008

Dynamic Data Models

A recent article on Infoq: Beyond SOA: A New Enterprise Architecture Framework for Dynamic Business Applications gives an interesting point of view about development of Enterprise Applications both from an architecture and a methodology perspective. Article's conclusions are:

"the evolution of flat, stateless, static, client-server web-based solutions have contributed to the disconnect between IT architecture and the real-world of hierarchical, stateful, dynamic, distributed business. We also discussed how traditional engineering approaches do not support the development of adaptive systems capable of supporting the dynamics of business."


A fundamental issue with present enterprise SOA is about the abuse of static data models. As the author explained, relational databases are for static data relationship, but only some parts of the enterprise ecosystem can be considered as being ruled by static relationships. For a more technical example, XML was supposed to be here to overcome relational limitations, as it should provide more robust data representations. In fact, an XML document is robust because by definition you could add elements without breaking the semantic of the document itself, but this is hardly true if then the XML document is parsed into static object wrappers, as most of the "modern" tools provide. As a consequence, proliferation of strict XML schema validation totally eliminates XML intrinsic flexibility and robustness. A more dynamic approach in the manipulation and representation of data flowing in the enterprise should be the focus of next generation softwares. Dynamic data manipulation will provide much better flexibility than static DOM object wrappers that are so common today.

Unfortunately present software tools are still focused on what the author calls static engineering frameworks which are good, even indispensable, to build bridges or airplanes, but very bad to create software useful to represent the dynamic and fuzzy business behavior. The well celebrated web-centric architectural model is good for information representation and retrieval, but when that model is used as a framework to capture and model business real life enterprise applications, then its static nature miserably fails the target.

Basically, a picture of a dog is not a dog, but looks like the software industry still has not fully understood this evidence.

Friday, March 21, 2008

Eric Lerognon's JCAPS 6 to SAP ECC 5.0 notes

This note, sent by my former colleague Eric Lerognon of Sun France, demonstrates how to connect from JCAPS 6 to SAP ECC 5.0.

Merci beaucoup Eric!

Monday, March 17, 2008

Will Java CAPS 6 be based on Netbeans 6.1 ?

Rumors are that the next generation of Java CAPS will be based on a new Netbeans version. No more fights with the eDesigner, eventually. ICAN 5.0 and JCAPS 5.1 IDEs were based on a very old Netbeans (v 3.5) heavily customized by SeeBeyond, called the eDesigner. Additionally jcaps 6 JEE runtime is going to be Glassfish, the Sun open-source application server (at present jcaps runs over old SJAS 8.0).
For seasoned jcaps developers, used to workaround some eDesigner's weird behaviors, it will be a huge improvement, as Netbeans 6 represents probably the most advanced Java IDE in the market (and yes, I mean even better than Eclipse). Glassfish then is one of the best JEE 5 and EJB 3 implementation available, this means Java CAPS 6 is evolving to a complete and powerful Java enterprise application development environment, not limited to EAI only. That shows a strong Sun's commitment in favor of jcaps, good for both partners and customers.