Home » 2012 (page 12)

Yearly Archives: 2012

What is a PermGen leak?

What follows is a practical introduction to a specific type of memory problems in Java applications. Namely – we will analyze the errors that cause the java.lang.OutOfMemoryError: PermGen space symptom in the stack trace. First of all we will go through the core concepts required to understand the subject – and explain what objects, classes, classloaders and the JVM memory ...

Read More »

Recycle Bin in Database

Oracle introduced in database 10g new feature called ‘Recycle Bin’ to store the dropped database objects. If any table is dropped then any associated object to this table such as indexes, constraints and any other dependent object are renamed with a prefix of bin$$. Use of Recycle Bin If user drop an important object accidentally, and he want to get ...

Read More »

Google Guava EventBus and Java 7 WatchService for Event Programming

java-interview-questions-answers

This post is going to cover using the Guava EventBus to publish changes to a directory or sub-directories detected by the Java 7 WatchService. The Guava EventBus is a great way to add publish/subscribe communication to an application. The WatchService, new in the Java 7 java.nio.file package, is used to monitor a directory for changes. Since the EventBus and WatchService ...

Read More »

Using Cryptography in Java Applications

This post describes how to use the Java Cryptography Architecture (JCA) that allows you to use cryptographic services in your applications. Java Cryptography Architecture Services The JCA provides a number of cryptographic services, like message digests and signatures. These services are accessible through service specific APIs, like MessageDigest and Signature. Cryptographic services abstract different algorithms. For digests, for instance, you ...

Read More »

Google Guava MultiMaps

Guava? This is the first in a series of posts where I’ll be attempting to explain and explore Google’s awesome Guava java library. I first came across Guava whilst searching for generic versions of Apache Commons Collections – I needed a Bimap and was fed up with having to pepper my code with casts – however what I found was ...

Read More »

How much memory do I need

What is retained heap? How much memory will I need? This is a question you might have asked yourself (or others) when building a solution, creating a data structure or choosing an algorithm. Will this graph of mine fit in my 3G heap if it contains 1,000,000 edges and I use a HashMap to store it? Can I use the ...

Read More »

Chef Happens – Managing Solaris with Chef

Adding Solaris servers to be managed by Chef was the most annoying entry in our Wix.com DevOps backlog for almost a year. We moved our MySQL databases to Solaris more than a year ago. We automate everything, but getting Solaris into the Chef kitchen was not that trivial. There is minimal support for Solaris in Chef, so I have made ...

Read More »