background preloader

Java Virtual Machine (JVM) - a JVM option to kill the VM when an

Java Virtual Machine (JVM) - a JVM option to kill the VM when an

Java HotSpot VM Options Please note that this page only applies to JDK 7 and earlier releases. For JDK 8 please see the Windows, Solaris, Linux and Mac OS X reference pages. This document provides information on typical command-line options and environment variables that can affect the performance characteristics of the Java HotSpot Virtual Machine. Unless otherwise noted, all information in this document pertains to both the Java HotSpot Client VM and the Java HotSpot Server VM. Categories of Java HotSpot VM Options Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows and Solaris & Linux. Options that begin with -X are non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in subsequent releases of the JDK. Some Useful -XX Options Default values are listed for Java SE 6 for Solaris Sparc with -server. The options below are loosely grouped into categories. Behavioral Options

JSF 2.0, JEE and Spring 3.0 Abstract The JavaServer Faces (JSF) 2.0 is the newest Java presentation technology that is covered in JSR-314 and was publicly released on July 01, 2009. It became a part of the JEE6 standard and can be comfortably used in conjunction with other JEE frameworks, with Spring or just on its own. Management Summary There are many presentation frameworks available, so why JSF 2.0? Facelet SupportValidation & Conversion MechanismsResources SupportTemplatingExpression LanguageAnnotation Support JSF 2.0 makes strong use of the SoC (Separation of Concerns) principle, promoting the MVC (Model View Controller) design pattern. Presentation with JSF 2.0 This chapter discusses the model of the presentation used in JSF 2.0. Initial setup A JSF project is an ordinary Java Web project. The View The definition of a JSF presentation is relatevely simple. Please note, that along with the JSF core components, the PrimeFaces component dataTable is used. The Backing Bean Internationalization Validation References

Getting alerts when Java processes crash When bugs occur in the Java runtime environment, most administrators want to get notified so they can take corrective action. These actions can range from restarting a Java process, collecting postmortem data or calling in application support personnel to debug the situation further. The Java runtime has a number of useful options that can be used for this purpose. The first option is “-XX:OnOutOfMemoryError”, which allows a command to be run when the runtime environment incurs an out of memory condition. $ java -XX:OnOutOfMemoryError=”logger Java process %p encountered an OOM condition” … Syslog entries similar to the following will be generated each time an OOM event occurs: Jan 21 19:59:17 nevadadev root: [ID 702911 daemon.notice] Java process 19001 encountered an OOM condition Another super useful option is “-XX:OnError”, which allows a command to be run when the runtime environment incurs a fatal error (i.e., a hard crash).

Identity federation using SAML and WebSphere software Introduction This article is centered on the aspects related to Identity Federation across Service-Oriented Architectures and how to support this emerging paradigm using WebSphere® software. Identity Federation describes use-cases, standards and technologies for enabling the propagation of identity information across different security domains. Several standards are proposed for promoting federation among enterprises, we'll focus the attention mainly on SAML and WS-Security standards. During the article, we’ll show how WebSphere Application Server and Websphere DataPower can act as an Enterprise Service Bus in scenarios where Identity Federation is applied, in these terms detailed use case and examples, coming from real experiences, will provide information on how to handle SAML assertions with the capability introduced by these two products. Key elements Back to top Identity federation and SAML Figure 1. Assertions Protocols Authentication queryAttribute queryAuthorization decision query

City Life More Odds and Ends of Hprof heap dump format Hprof binary file format is back in my head again, as I consider whether to use it as a native heap dump format. When I wrote about it previously, I was more interested in how to parse it. Now I must consider its strengths and limitations. Strengths Format widely supported by profilers and heap analyzers. Written by the JVM directly and the hprof agent. Compact encoding of both primitive and reference fields. Hprof class and object identifiers are stable for multiple heap dumps written in the same JVM lifetime. The JVM implementation is very fast. The hprof implementation is very readable, excellent code. Weaknesses The JVM uses machine addresses as object identifiers, which change with every gc, so two heap dumps from the same JVM can't be compared object-wise. JVM heap dumps consistently have dangling references to objects that are not reported in the heap dump and, even if -live is specified, objects that are unreachable from any root. Conclusion

server and client sides - DigiZol Web services are a handy method of integrating independent systems. Apache Axis is one of the best free tools available for implementing and deploying web services, and also for implementing the web service clients. In this article we will create a simple, but complete web service and a client for this service step-by-step. Article will be explanatory as much as possible to succeed you in implementing it yourself alone after completing this tutorial. Prerequisites Must be familiar with JavaFamiliar with basics on a web server like TomcatSome knowledge in configuring Axis will be an added advantage System Configuration Requirements We will be discussing the configuration in brief as our scope is mainly on web services. JDK installationThese examples have been tested on a machine with JDK 1.6 version. Web ServerYou must have a web server installed; and we will be using Tomcat (5.5 version) web server. Apache Axis 1.4Download Apache Axis 1.4 here{link}. Implementation - web service and client

Joshua Bloch: Performance Anxiety – on Performance Unpredictability, Its Measurement and Benchmarking Joshua Bloch had a great talk called Performance Anxiety (30min, via Parleys; slides also available ) at Devoxx 2010, the main message as I read it was Nowadays, performance is completely non-predictable. You have to measure it and employ proper statistics to get some meaningful results.Microbenchmarking is very, very hard to do correctly. No, you misunderstand me, I mean even harder than that! There has been another blog about it but I’d like to record here more detailed remarks. Today we can’t estimate performance, we must measure it because the systems (JVM, OS, processor, …) are very complex with many different heuristics on various levels and thus the performance is highly unpredictable. Example: Results during a single JVM run may be consistent (warm-up, then faster) but can vary between JVM executions even by 20%. “Benchmarking is really, really hard!” Joshua mentiones a couple of interesting papers, you should check the slides for them. Personal touch Conclusion

Build Your Own PC February 2010: CPU, Motherboard And RAM Whenever I'm thinking of building a new PC I'm starting the selection process months earlier. I begin with an analysis of the needs, something that is often forgotten by users. What will the computer be used for? The PC that I want to build for instance has to be an all purpose PC. I have decided to divide the article into different parts to be able to concentrate on specific hardware and why I have chosen them. Build Your Own PC: CPU PC users have a wide selection of CPUs. This basically leaves two options: An Intel Core-i7, Core-i5 or an AMD Phenom II X4. You will end up with a few CPUs that would make a good selection: Intel Core i7-860, Intel Core i7-920, Intel Core i5-750 or AMD Phenom II X4 965 BE. The Intel Core i7-860 is the fastest Intel CPU in this field but also the most expensive one, we are talking about a difference of €100 here. My Selection: Intel Core i7-860Alternative: AMD Phenom II X4 965 BE Build Your Own PC: Motherboard What should the motherboard offer? My Selection:

Visualising Garbage Collection in the JVM Recently, I have been working with a number of customers on JVM tuning exercises. It seems that there is not widespread knowledge amongst developers and administrators about how garbage collection works, and how the JVM uses memory. So, I decided to write a very basic introduction and an example that will let you see it happening in real time! This post is about the HotSpot JVM – that’s the ‘normal’ JVM from Oracle (previously Sun). First, let’s take a look at the way the JVM uses memory. The Permanent Generation The permanent generation is used only by the JVM itself, to keep data that it requires. The size of the permanent generation is controlled by two JVM parameters. The Heap The heap is the main area of memory. This size of the heap is also controlled by JVM paramaters. When you create an object, e.g. when you say byte[] data = new byte[1024], that object is created in the area called Eden. The following explanation has been simplified for the purposes of this post. Like this:

ComDynamics Agile anti-patterns seen in the field Introduction Over the years I have lead and worked in numerous teams that have successfully delivered projects using Agile software development methodologies because the critical success factors were present. From Wikipedia: In software engineering, an anti-pattern (or antipattern) is a pattern used in social or business operations or software engineering that may be commonly used but is ineffective and/or counterproductive in practice. Some convenient Agile anti-patterns are listed below. The invisible Product Owner They seek him here, they seek him there. Field of Dreams (no core value proposition) Build it and they will come. ScrumBut How many times have you heard, “we’re using scrum but…”? Customer Driven Development (CDD) We’ve all heard of BDD, TDD, and FDD but what about CDD? Everything including the Kitchen Sink Conclusion Agile anti-patterns are typically the result of an elephant in the room not being dealt with.

How to tame java GC pauses? Surviving 16GiB heap and greater. Memory is cheap and abundant on modern servers. Unfortunately there is a serious obstacle for using these memory resources to their full in Java programs. Garbage collector pauses are a serious treat for a JVM with a large heap size. There are very few good sources of information about practical tuning of Java GC and unfortunately they seem to be relevant for 512MiB - 2GiB heaps size. You may also want to look at two articles explaining particular aspects of HotSpot collectors in more details “Understanding GC pauses in JVM, HotSpot's minor GC” and “Understanding GC pauses in JVM, HotSpot's CMS collector”. Target application domain GC tuning is very application specific. Heap is used to store data structures in memory. Economy of garbage collection Garbage collection algorithms can be either compacting or non-compacting. Solution to this Gordian knot lies in “weak generational hypothesis”. Most objects become garbage short after creation (die young). Object demography Pauses in CMS See also

Related: