Links

Distributed transactions in Spring, with and without XA

While it's common to use the Java Transaction API and the XA protocol for distributed transactions in Spring, you do have other options. The optimum implementation depends on the types of resources your application uses and the trade-offs you're willing to make between performance, safety, reliability, and data integrity. In this JavaWorld feature, SpringSource's David Syer guides you through seven patterns for distributed transactions in Spring applications, three of them with XA and four without.

http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html

Filed under  //   java   jee   jta   spring   transactions   xa  
Posted August 24, 2010 by email 

openHAB: open Home Automation Bus

Introduction 

The open Home Automation Bus (openHAB) project aims at providing a universal integration platform for all things around home automation.

It is designed to be absolutely vendor-neutral as well as hardware/protocol-agnostic. openHAB brings together different bus systems, hardware devices and interface protocols by dedicated bindings. These bindings send and receive commands and status updates on the openHAB event bus. This concept allows designing user interfaces with a unique look&feel, but with the possibility to operate devices based on a big number of different technologies. Besides the user interfaces, it also brings the power of automation logics across different system boundaries.

The Technology Stack 

openHAB is a pure Java solution, fully based on OSGi. The Equinox OSGi runtime and Jetty as a web server build the core foundation of the runtime.

The openHAB Designer, which is the configuration tool for the openHAB Runtime, is an Eclipse RCP application with Xtext-based editors to offer a highly user-friendly way of editing configuration files, UI definitions and automation rules. For the automation rules, JBoss Drools builds the backbone.

If you are a fan of Java/OSGi/Eclipse, openHAB should be the perfect match for you. If you are not, you might want to consider other tools like Misterhouse, which aim at almost the same thing and are very mature already.

Bindings 

As the OSGi platform allows a highly modular architecture, the bindings are realized as different bundles, which can be dynamically plugged to openHAB, so that every user can decide on the bindings he is interested in.

Here are some examples for bindings (but please be aware that most are not yet implemented):

  • KNX
  • X10
  • 1-wire
  • RS-232
  • Jabber
  • HTTP
  • Bluetooth
  • IrMon
  • Asterisk
  • Media player (Winamp, WMP, iTunes, Amarok, etc.)
  • Wake-on-LAN

User Interfaces

Currently, there is only one user interface available for openHAB, a web-based UI, which can be used from many different devices. Nonetheless, openHAB is designed in a way that there can easily be added further user interfaces; be it a remote terminal or a native iPad application.

 

 


http://code.google.com/p/openhab/

 

       
Click here to download:
openHAB_open_Home_Automation_B.zip (350 KB)

Filed under  //   automation   hab   home   java   osgi   ui   web  
Posted August 18, 2010 by email 

JMXTerm: command line based interactive JMX client

Jmxterm is an open source command line based interactive JMX client. It's designed to allow user to access JMX from command line without graphical environment. In another word, it's a command line based jconsole.

 

Internally Jmxterm depends on JDK jconsole library but it doesn't require graphical environment(such as X in linux) at runtime.

 

 

 

http://wiki.cyclopsgroup.org/jmxterm 

 

 

Filed under  //   cli   java   jmx  
Posted August 18, 2010 by email 

Akka: simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors

Akka is the platform for the next generation event-driven, scalable and fault-tolerant architectures on the JVM.

http://www.akkasource.org/

Scala Example:

 1 // creates an actor on the remote node 
 2     val service = actor("remote.node", 9999) {
 3       case fun => reply(fun())
 4     }
 5 
 6     // creates a processing function 
 7     val processingFun = () => ...
 8 
 9     // sends function to remote node 
10     service ! processingFun

Filed under  //   actors   concurrency   java   scala  
Posted May 28, 2010 by email 

Tomcat MemoryLeakProtection

Tomcat's new memory leak prevention and detection
http://www.tomcatexpert.com/blog/2010/04/06/tomcats-new-memory-leak-preventio...

Notes regarding implementation of Tomcats MemoryLeakProtection
http://wiki.apache.org/tomcat/MemoryLeakProtection

JreMemoryLeakPreventionListener
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMe...

Filed under  //   java   leak   memory   tomcat   webapp  
Posted April 7, 2010 by email 

Jansi: java library use ANSI codes to format console output

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.

http://jansi.fusesource.org/

Filed under  //   ansi   console   java  
Posted March 11, 2010 by email 

28 Rich Data Visualization Tools

List of 28 Rich Data Visualization Tools

http://www.insideria.com/2009/12/28-rich-data-visualization-too.html

Filed under  //   charts   flash   flex   java   javascript   ui   web  
Posted December 15, 2009 by email 

javamelody: monitoring of JavaEE applications

http://code.google.com/p/javamelody/

The goal of JavaMelody is to monitor Java or Java EE applications servers in QA and production environments. It is not a tool to simulate requests from users, it is a tool to measure and calculate statistics on real operation of an application depending on the usage of the application by users.

JavaMelody is opensource (LGPL) and production ready: in production in an application of 25 person years. JavaMelody is easy to integrate in most applications and is lightweight (no profiling and no database).

JavaMelody is mainly based on statistics of requests and on evolution charts.

It allows to improve applications in QA and production and help to:

* give facts about the average response times and number of executions
* make decisions when trends are bad, before problems become too
serious
* optimize based on the more limiting response times
* find the root causes of response times
* verify the real improvement after optimizations

It includes summary charts showing the evolution over time of the following indicators:

* Number of executions, mean execution times and percentage of
errors of http requests, sql requests or methods of business
façades (if EJB3 or if Spring)
* Java memory
* Java CPU
* Number of user sessions
* Number of jdbc connections

These charts can be viewed on the current day, week, month or year.

JavaMelody includes statistics of predefined counters (as of today http requests, sql requests and methods of business façades if EJB3 or if Spring) with, for each counter :

* A summary indicating the overall number of executions, the average
execution time, the cpu time and the percentage of errors.
* And the percentage of time spent in the requests for which the
average time exceeds a configurable threshold.
* And the complete list of requests, aggregated without dynamic
parameters with, for each, the number of executions, the mean
execution time, the mean cpu time, the percentage of errors and an
evolution chart of execution time over time.
* Furthermore, each http request indicates the size of the flow
response, the mean number of sql executions and the mean sql time.

It also includes statistics on http errors, on warnings and errors in logs and on data caches if ehcache.

An optional and independent collect server may be used if necessary to unload the application of storage management, and of reports generation and to centralize the data of clustered applications or of several applications.

Filed under  //   java   monitoring  

YouDebug: Java program that lets you script a debug session through Groovy

Here is the problem; your program fails at a customer's site with an exception, but you can't (or don't want to) reproduce the problem on your computer, because it's too time consuming. If only you could attach the debugger and collect a few information, you can rapidly proceed on fixing the problem. But running a debugger at a customer's site is practically impossible; if the user isn't a techie, it's out of question. Even if he is, you'd still need the source code loaded up in the IDE, then you have to explain to him where he needs to set breakpoints and what to report back to you. It's just too much work.

That's where YouDebug comes into play. YouDebug is a Java program that lets you script a debug session through Groovy. You can think of it as a programmable, non-interactive debugger --- you can create a breakpoint, evaluate expressions, have it dump threads, and a lot more, without requiring any source code. Your customer can just run the tool with the script you supplied, without any knowledge about Java.

YouDebug uses the same Java Debug Interface that IDEs use, so from the point of view of your program, YouDebug behaves as a debugger. Therefore you need not do anything special with your program.

In this way, the troubleshooting of your program gets a lot easier.

http://youdebug.kenai.com/

Filed under  //   debugging   DSL   groovy   java   JDI  
Posted November 10, 2009 by email