August 6, 2010

JRebel 3.1.2 released

Filed under: news — Jevgeni Kabanov @ 1:20 pm

JRebel 3.1.2 incorporates improved support for OSGi (all containers), JBoss 6 and Freemarker as well as a host of fixes. See the full change log or download right away.

August 5, 2010

Video: Do you really get class loaders? — a Jazoon talk by Jevgeni Kabanov

Filed under: blog — David Booth @ 5:27 pm

Classloaders are one of those subjects that affect every Java developers’ daily life, but aren’t necessarily something that most people understand to the core. The fact that you’re interested in this, my friend, makes you an exception to the rule. Luckily, our CTO Jevgeni is as well, and he regularly eats classloaders for breakfast. The great folks from Jazoon 2010 in Zurich have recently made his “Do you REALLY get class loaders?” presentation available, which we’re happy to share with you below. Jevgeni has also previously written a series of articles on class loading that you can read at your leisure. If you want to see the video stream and the slides at the same time, click anywhere other than the “Play” button and you will be taken to the Parleys website (which also happens to have lots of other great presentations).

And hey, since you’re already here, why not see how JRebel handles classloaders first hand?

Here’s the presentation abstract:

Class loaders are at the core of the Java language. Java EE containers, OSGi, NetBeans modules, Tapestry 5, Grails and many others use class loaders heavily. Yet when something goes wrong, would you know how to solve it? In this session we’ll take a tour of the Java class loading mechanism, both from JVM and developer point of view. We’ll see how different delegation systems are built, how synchronization works, what is the difference between finding classes and resources, what wrong assumptions has been made and are now supported. Next we will look at typical problems that you get with class loading and how to solve them. ClassNoDefError, IncompatibleClassChangeError, LinkageError and many others are symptoms of specific things going wrong that you can usually find and fix. For each problem we’ll go through a hands on demo with a corresponding solution. We’ll also take a look at how and why classloaders leak and how can you remedy that.

July 28, 2010

Kittens?

Filed under: blog — David Booth @ 9:06 pm

July 23, 2010

Improving Tomcat productivity – with JRebel and TCat

Filed under: blog — David Booth @ 10:57 am

Hey folks!

Next week we’re happy to be a part of a webinar with the great team over at MuleSoft, and we wanted to extend the invite out to all of you! Using JRebel together with TCat makes life a lot easier for Tomcat users, so take this chance to learn more and register for the event!

~~
Do you ever ask yourself these questions: “Can I eliminate the redeploy phase from Tomcat’s development cycle? How can I more efficiently diagnose performance bottlenecks in my Tomcat application? How can I simplify configuring Tomcat for my application?”

Tomcat users spend 160 hours per year waiting for redeploys, not to mention the time getting back into the flow of coding. They also spend quite a bit of time configuring Tomcat for deployment to production, and investigating and resolving performance and availability issues — without deep diagnostic data.

In a webinar on July 28th at 10am PT, MuleSoft and ZeroTurnaround have teamed up to provide web application developers using Tomcat with the ultimate “one-two punch” for developer productivity.

Register now!

Join us for a 45-minute demo-driven webinar, where you will see how JRebel and Tcat Server can help you:

* Instantly see the effects of your code changes without having to restart Tomcat
* Discover and quickly resolve performance issues with deep diagnostic capabilities
* Visually browse and edit Tomcat configuration files

Speakers:
Sateesh Narahari, Director of Product Management at MuleSoft
Toomas Romer, Co-Founder, Lead Developer at ZeroTurnaround

Logistics:
Date: July 28, 2010
Time: 10am PT / 1pm ET / 7pm GMT (find your time zone)

About MuleSoft:
MuleSoft is the Web Middleware Company, providing enterprise-class software based on the world’s most popular open source application infrastructure products, Mule ESB and Apache Tomcat. MuleSoft brings an ideal combination of simplicity and power to today’s web applications with Mule ESB, Tcat Server and iBeans. MuleSoft’s products boast more than 1.5 million downloads and over 2,500 production deployments by leading organizations such as Walmart.com, Nestlé, Honeywell and DHL, as well as 5 of the world’s top 10 banks. MuleSoft is headquartered in San Francisco with offices worldwide.

About ZeroTurnaround:
ZeroTurnaround builds technologies that make the Java platform more productive: both for development and production. Our Rebel technology integrates directly into the JVMs, application servers, and development tools that most teams use – making them more competitive. JRebel saves Java EE developers between 3-7 weeks of wasted development time (yup; 40-hour workweeks), has been downloaded hundreds of thousands of times, and pays for itself in under a week. Our customers are the who’s who of the finance, web application, and technology industries, including most global banks plus the Bank of America, American Airlines, Lufthansa, LinkedIn, HP, Siemans, Logica, Kayak, Oracle, IBM, and more. For rolling out or rolling back upgrades to live applications instantly, check out LiveRebel, in private beta now.

July 22, 2010

“Copy-on-Iterate” Java Idiom considered broken

Filed under: blog — Jevgeni Kabanov @ 1:04 pm

This is a story of an interesting support request handled by our guru Lauri Tulmin. The inquiry was about a rare occurring ArrayIndexOutOfBoundsException that JRebel seemed to cause in Wicket. After some investigation he discovered that the root exception was thrown from the following Wicket code:

private final Map<IModifiable, Entry> modifiableToEntry = 
   new ConcurrentHashMap();
 
  public void start(Duration pollFrequency) {
    this.task = new Task("ModificationWatcher");
 
    this.task.run(pollFrequency, new ICode() {
      public void run(Logger log) {
        Iterator iter = new ArrayList(
          ModificationWatcher.this.modifiableToEntry.values()).iterator();
        while (iter.hasNext())

Specifically the exception was thrown from the constructor of ArrayList. How was that possible?

Let’s take a step back and review the reasons for this code. One issue with collections is that when iterating a ConcurrentModificationException is thrown if a collection is changed (usually by a different thread). This is done to protect the Iterator from unpredictable behaviour. A common idiom to avoid it is to copy the collection before iteration like that:

for(Iterator i = new ArrayList(collection).iterator(); i.hasNext();) {...}

Note that the collection must either to be synchronized or otherwise suitable for a multi-threaded environment.

This idiom is a very common one, as easily proven by a simple Google Code search. In fact we used it several times in the JRebel code and is present in several places in Wicket as well. So how could this cause an ArrayIndexOutOfBoundsException?

When Lauri investigated in depth he found out that this idiom is inherently unsafe in a multi-threaded environment (even when the underlying collection is synchronized!). The reason for that is the way ArrayList was constructed before Java 1.6. In my 1.5 Java SDK source code it looks like this:

public ArrayList(Collection<? extends E> collection) {
  int size = collection.size();
  firstIndex = 0;
  array = newElementArray(size + (size / 10));
  collection.toArray(array);
  lastIndex = size;
  modCount = 1;
}

The issue is that there is a race condition between the time the size is recorded and the collection.toArray(array) is called. During that time it is conceivable (and indeed possible) that the size of the collection is changed by a different thread. If the size is now bigger, the array copying in toArray() fails with the dreaded ArrayIndexOutOfBoundsException. When researching the issue further we found that the constructor in Java 1.6 ArrayList has been changed to avoid this issue, so at least on Oracle Java 1.6 or later you are safe. Unfortunately I couldn’t find a specific bug referring to that issue, so likely as not it’s an accidental fix.

So what should you do to avoid this issue? One way is to put the synchronized block around the whole loop, but this requires that you only access that collection from other threads in the same synchronized block. An easier solution is to use the toArray()method like this:

for (Iterator i = Arrays.asList(collection.toArray()).iterator(); i.hasNext();)

July 14, 2010

JRebel 3.1.1 “Oogle” Released

Filed under: news — Jevgeni Kabanov @ 11:48 am

This minor release includes a score of improvements across the board. Among the most important is that the Google App Engine support is now out of the beta and Google Web Toolkit support has been substantially improved, and the only reason we still keep it in beta is because we don’t have a full automated test harness for it yet. We have also tested JRebel with Tomcat 7 and Jetty 7.1 and can now declare them officially supported. Beta support for serializing added fields has been added, but is still disabled by default. Please add -Drebel.serialization=true and let us know how it works for you. Also we worked some of our magic with AspectJ and Groovy, so those of you who had issues should definitely upgrade to this version. See full changelog for details, or grab the download!

June 1, 2010

JRebel 3.1 — ORM Goodness

Filed under: news — Jevgeni Kabanov @ 1:36 pm

With the support for all Java EE standards this release of JRebel will help you reach a new level of productivity. Whatever change you make to your code, whether it’s a class, resource, configuration or a component, you can immediately see it in your application, with no need to build or redeploy. Although we’re still waiting on usage stats to confirm it, we estimate that JRebel 3.1 will eliminate up to 95% of builds/redeploys that you have to do without it on a common Java EE project.

The first thing you’ll notice after downloading the new 3.1 release, is the support for reloading JPA entities and configuration on all containers. Hibernate and OpenJPA plugins are now enabled by default, but for TopLink/EclipseLink we’re waiting for more user feedback, so go ahead and fire it up. JRebel also fully support reloading native entities and configuration for Hibernate and TopLink.

The second is the support for EJB interface changes and JSP scriptlet changes in GlassFish. Changes to EJB interfaces and scriptlets are now reloaded instantly on all major containers. New features include a spanking new iBatis plugin, beta support for the Geronimo container and a host of others.

Download it while it’s hot!

May 1, 2010

JRebel 3.0.1 Released

Filed under: news — Jevgeni Kabanov @ 7:59 pm

The first update to the 3.x line includes better handling of JDK proxies, support for Spring dm Server 2.x, advanced scriptlet support for WebSphere and Resin and more. Remember that the advanced scriptlet support is only available with the Enterprise Add-On, which is a free upgrade for all current users –- as long as you upgrade before June 1st.

Pick up the new version at our download page, with or without the Enterprise Add-On.

April 16, 2010

JRebel 3.0 Released!

Filed under: news — Jevgeni Kabanov @ 9:59 am

This is exciting — Today is the day that we get to announce the culmination of 8 months of development effort, fine-tuning, bug fixing, and, awesome awesome awesome feature-adding (don’t just take our word for it, check out the buzz on Twitter). Today we announce the release of JRebel 3.0!

JRebel has matured a lot with this release. Adding to the ability to reload classes, it now integrates tightly with all common Enterprise stacks, allowing seamless reloading of almost all changes across the board. We’re talking about preventing 100% of your incremental builds and over 90% of the redeploys that you had to do during the day. Keep your focus, stay in flow, and have more fun delivering more features, with less defects, faster — just by taking your time back from an antiquated process.

Here’s the exciting part — the new features:

  • Better Java EE support
    • EJB — JRebel now includes plugins for JBoss (4.x, 5.x), Oracle Weblogic (8.x, 9.x, and 10.x) and IBM WebSphere (6.1 and 7.0) that support changing the Local/Remote EJB interface in EJB 1.x, 2.x and 3.x. It also supports on-the-fly dependency injection for @EJB annotation in JBoss. Unfortunately we don’t support EJB interface changes on IBM WebSphere 6.0 or earlier and require the EJB 3.0 Feature Pack to be installed on IBM WebSphere 6.1, even if you use EJB 1.x or 2.x.
    • JSP <scriptlet>-s — Now when you change your Java code (e.g. add a new class or method) it can be immediately used in the Java code snippets in the JSP.
    • JSF — Plugin for Mojarra that supports changes to configuration and annotations, and other JSF implementations are on the way.
    • CDI — Plugin for Weld that supports changes to annotations.
    • JPA — Plugin for OpenJPA that supports changes to entities and configuration. We’re considering this beta for this release and have it disabled by default. Other JPA implementation are on the way.
  • Framework support
    • Seam — Supports changes to annotations.
    • Hibernate — Supports changes to entities, annotations and configuration. This rocks, but we’re taking it easy and considering it beta. It’s disabled by default.
  • Support for adding static fields and changing enums. Previously when you added a static field to your class you’d see a discouraging warning in the console and get an exception when trying to access the field. Now JRebel will happily print “Reinitialized class” and your application will continue working as if nothing happened. To top it off you can also change Java 1.5 enums in any way you like and they’ll continue working!
  • Startup time improvements. We significantly improved class/resource lookup overhead with caching and better server integration. Our nightly users are reporting up to 2x improvements in startup time.
  • 25%-30% less memory use. It is not uncommon to need a lot of PermGen heap with JRebel enabled, so we optimized memory use and will continue to drive it down in the upcoming milestones.
  • Better Proxy Support JRebel now integrates tightly with Javassist and CgLib, providing much better compatibility with changes to class signature in some advanced cases, e.g. JBoss Seam.
  • rebel.xml Editor. A GUI editor for creating JRebel configuration files is now available and will soon be integrated in the IDEs. This makes it easier to setup your project and get started with JRebel.

We’re also happy to announce the release of the JRebel Enterprise Add-On. It’s meant for larger enterprises working with a more diverse set of applications, and preferences towards more centralized management. It supports older or discontinued technologies, which often require more maintenance and have longer restart & redeploy times. The Enterprise Add-On will be a free upgrade for all current users – as long as you upgrade before June 1st.

You can try JRebel free for 30 days, with or without the Enterprise Add-On from the same place where everyone else gets the new version.. right here! Download JRebel

April 13, 2010

JRebel 3.0 RC2 Available

Filed under: news — Jevgeni Kabanov @ 2:47 pm

Say hello to the last release candidate before the final release hits the virtual shelves on Friday — JRebel 3.0 RC2. The changes mostly include fixes, though some features were tweaked as well. Download it now and tell us if there’s anything wrong with it.

Older Posts »

Our Customers Say

“For the price, and for how easy it is to get installed and running in a developers’ environment, using JRebel is pretty close to a no-brainer.”

Jim Lesko, GT Nexus

Recent Tweets

RT @nilsga: Top three productivity changes in current project: 1. Use javarebel, 2. Switch to Linux, 3. Two monitors 1 week ago

RT @GabrielKast: java is optional but JRebel is mandatory. Luckily it's only 59$ per year ... Three month of of World of Warcraft! 1 week ago

Olark Livehelp