Java 8. Build. Java Secret: Using an enum to build a State machine. Overview The enum in Java is more powerful than many other languages which can lead to surprising uses.
In this article, I outline some the individual features of enum in Java, and put them together to form a state machine. Enum for Singleton and Utility class You can use an enum as a Singleton or Utility very simply. Enum to implement an interface You can also implement an interface in an enum. Each Enum Instance a different sub-class You can override the behaviour of an instance. This effectively give the instance a different sub-class of the enum with its own implementation. Programmatically Restart a Java Application.
We Recommend These Resources Today I'll talk about a famous problem : restarting a Java application.
It is especially useful when changing the language of a GUI application, so that we need to restart it to reload the internationalized messages in the new language. Some look and feel also require to relaunch the application to be properly applied. A quick Google search give plenty answers using a simple : 1.Runtime.getRuntime().exec("java -jar myApp.jar"); Updating Java EE in Production: A Report in Three Acts Including a Foreword and an Afterword.
Foreword A few weeks ago I ran a survey asking a dozen or so questions about Java EE production update.
I’d like to thank the 607 individuals who took some time from their busy life to help me out. Today, I’ll return the favor by analyzing the resulting data for your pleasure. If for some reason you don’t trust me, feel free to check the calculations on the original data in this spreadsheet. I’m sorry I couldn’t do this before, but life was too busy to do a proper analysis in the meantime. Fork-Join Development in Java SE. Edward Harned (eh at coopsoft dot com) Senior Developer, Cooperative Software Systems, Inc.
February, 2010 [updated June, 2013]Serbo-Croatian translation on June, 2013.What is Fork-Join? Think of a fork in the road where each path eventually comes back together — joins.Fork-Join breaks an application into several parts for parallel processing and joins the results at the end.Figure 1: Fork-Join Structure. Introducing Chronon: The Time Travelling Debugger for Java. Last week I read an announcement about Chronon, a time travelling debugger.
It sounds very appealling - if you're like me, you've often missed that spot where you should have had a breakpoint. Another common issue is reproducing bugs that happened out in the field. Could this tool be the solution to all your problems? Sebastian Kübeck's Weblog. Does Java Have to be Extended?
There is a lot of discussion in the Java community which language features should be added to the Java language and how they should be integrated. Java Performance Tuning, Profiling, and Memory Management. Java application performance is an abstract word until you face its real implications.
It may vary depending on your interpretation of the word 'performance'. This article is meant to give the developer a perspective of the various aspects of the JVM internals, the controls and switches that can be altered to optimal effects that suit your application. There is no single size that can fits all. You need to customize to suit your application. You may be facing one of the issues listed below: The dreaded java.lang.OutOfMemory ErrorYour application is literally crawling.
Better Java Web Frameworks. I have been doing web application framework development for a long time.
In my first experience, we developed a “Web Application Framework“, to ease development so that even a business user could write an application. As the years passed, I never saw any business user writing applications because of the fact that this job belongs to programmers. Today some 4GL or DSL tools are still on the search of the same promise. Before writing our own framework, we had used WebObjects development tools, for Java web development. It was a very good platform that allowed front-end GUI development from a GUI editor with a component model. Akuma: Embeddable daemonization library -
Mark Thomas: Tomcat 7 & Servlet 3. Threading lightly, Part 2: Reducing contention. When we say a program is "too slow," we are generally referring to one of two performance attributes -- latency or scalability.
Latency describes how long it takes for a given task to complete, whereas scalability describes how a program's performance varies under increasing load or given increased computing resources. A high degree of contention is bad for both latency and scalability. Why contention is such a problem Contended synchronizations are slow because they involve multiple thread switches and system calls. When multiple threads contend for the same monitor, the JVM has to maintain a queue of threads waiting for that monitor (and this queue must be synchronized across processors), which means more time spent in the JVM or OS code and less time spent in your program code.
Fallacies of Distributed Computing - Wikipedia, the free encyclo. The Fallacies of Distributed Computing are a set of assumptions that L.
The network bites. Never forget it. – alexis
Peter Deutsch and others at Sun Microsystems (now Oracle Corporation) originally asserted programmers new to distributed applications invariably make.
These assumptions ultimately prove false, resulting either in the failure of the system, a substantial reduction in system scope, or in large, unplanned expenses required to redesign the system to meet its original goals.  The fallacies Blog Xebia France - Chroniques de la performance :
Tomcat. Annotation processing. JVM tuning. Proposed Asynchronous Servlet API. With Java NIO, you can theoretically manage 10,000 read, write and read/write connections with a total of one thread. Yes, but it's not clear to me how you can manage this under the Servlet API. With a custom non-servlet server, then sure, assuming the request processing for each channel is lightweight enough.
Note that the Servlet API extensions that Jetty has implemented could be standardised so that standard Servlets could work nicely with an NIO server efficiently like Jetty already has done. See the title of this thread :) EU Rejects Snoracle - Larry Vows to Fight! Oracle and the EU are escalating their legal battle over the Sun acquisition. The EU took the first step towards blocking the merger Monday with a formal Statement of Objections. Oracle immediately responded with a statement of its own, saying the EU has a "profound misunderstanding" about competition in the database market and "open source dynamics". Sources expected the objection to come soon after Oracle, led by CEO, Larry Ellison, refused to give up the MySQL database in the merger.
The company says it will "vigorously oppose" the EU's Statement of Objections. Java Performance Tuning, Profiling, and Memory Management. Jai: Java Advanced Imaging Binary Builds. Jai-imageio: Java Advanced Imaging Image I/O Tools Binary Builds. Stephen Colebourne's Weblog. Joe Darcy has opened up a call for methods to add to the core JDK 7 lang/util package. The idea is to add methods that are "commonly-written utility methods". JDK 7 utility methods There is lots of prior art in the field of general utility method libraries for Java. Perhaps the best known is Apache Commons Lang.
Sebastian K beck's Weblog. The Myth of the Secure Network If there is one initiative that is routinely misinterpreted it is the Jericho Forum. The general believe is that the Jericho Forum Members want everyone to remove the firewalls from our networks. Sebastian K beck's Weblog. We Don't Need to Care About IT Security? If you ask people how they or the organization they are working for deal with security, you usually get the following answer: We don't need to care about IT security. Joseph D. Darcy's Sun Weblog. Strings in switch and closures. Interview: Wilfred Springer on Bit Syntax for Java. Java. JavaFX, You've Come A Long Way. Finding Out Where Your Class Files Are. Java vs. C Performance....Again. HtmlUnit: A Quick Introduction.
Artistic Style - Index.