Skip to content

Commit

Permalink
First release :) 0.1-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiří Bubník committed Jan 20, 2014
1 parent 05b012f commit 3750fa5
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion HibernatePlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>HibernatePlugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion HotswapAgent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>HotswapAgent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion JettyPlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>JettyPlugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion LogbackPlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>LogbackPlugin</artifactId>
Expand Down
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ Hotswap Agent
=============
Java unlimited runtime class and resource redefinition.

The main purpose of this project is to avoid infamous change->*restart + wait*->check development lifecycle.
The main purpose of this project is to avoid infamous change->restart + *wait*->check development lifecycle.
Save&Reload during development should be standard and many other languages (including C#) contain this feature.

This project is still in a beta version.

## Easy to start
### Easy to start
Download and install DCEVM Java patch + agent jar and launch your application server with options
`-XXaltjvm=dcevm -javaagent:HotswapAgent.jar` to get working setup. Optionally add hotswap-agent.properties
to your application to configure plugins and agent behaviour.

## Plugins
### Plugins
Each application framework (Spring, Hibernate, Logback, ...) needs special reloading mechanism to keep
up-to-date after class redefinition (e.g. Hibernate configuration reload after new entity class is introduced).
Hotswap agent works as a plugin system and ships preconfigured with all major framework plugins. It is easy
to write your custom plugin even as part of your application.

## IDE support
### IDE support
None needed :) Really, all changes are transparent and all you need to do is to download patch+agent and
setup your application / application server. Because we use standard java hotswap behaviour, your IDE will
work as expected. However, we work on IDE plugins to help with download & configuration.


Quick start:
===========
## Install
### Install
1. download [latest release](//TODO) and unpack it's contents. You will need `jvm.dll` and `HotswapAgent.jar` files.
1. check that you have installed *JDK 1.7.0_45 Windows 64bit*, otherwise download and install [from here]
(http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
Expand All @@ -35,7 +35,7 @@ and put `jvm.dll` into it. For example: `C:\Program Files\Java\jdk1.7.0_45\jre\b
other platform/version, currently you need to compile the file yourself from the [source](https://github.com/Guidewire/DCEVM).
1. unpack `HotswapAgent.jar` and put it anywhere on your disc. For example: `C:\java\HotswapAgent.jar`

## Run your application
### Run your application
1. use your favorite IDE of choice
1. add following command line java attributes:
<pre>-XXaltjvm=dcevm -javaagent:PATH_TO_AGENT\HotswapAgent.jar</pre> You need to replace PATH_TO_AGENT with an actual
Expand All @@ -44,7 +44,7 @@ other platform/version, currently you need to compile the file yourself from the
1. start the application in debug mode.
1. save a resource and/or use the HotSwap feature of your IDE to reload changes

## What is available?
### What is available?
* Enhanced Java Hotswap - change method body, add/rename a method, field, ... The only unsupported operation
is hierarchy change (change the superclass or remove an interface).
* Reload resource - resources from webapp directory are usually reloaded by application server. But what about
Expand All @@ -71,23 +71,20 @@ Detail documentation of available properties and default values can be found in
How does it work?
=================

DCEVM
-----
### DCEVM
Hotswap agent does the work of reloading resources and framework configuration (Spring, Hibernate, ...),
but it depends on standard Java hotswap mechanism to actually reload classes. Standard Java hotswap allows
only method body change , which makes it practically unusable. DCEVM is a JRE patch witch allows almost any
structural class change on hotswap (with an exception of a hierarchy change). Although hotswap agent works
even with standard java, we recommend to use DCEVM (and all tutorials use DCEVM as target JVM).

Hotswap agent
-------------
### Hotswap agent
Hotswap agent is a plugin container with plugin manager, plugin registry, and several agent services
(e.g. to watch for class/resource change). It helps with common tasks and classloading issues. It scans classpath
for class annotated with @Plugin annotation, injects agent services and registers reloading hooks. Runtime bytecode
modification is provided by javaasist library.

Plugins
-------
### Plugins
Plugins administered by Hotswap agent are usually targeted towards a specific framework. For example Spring plugin
uses agent services to:
* Modify root Spring classes to get Spring contexts and registered scan path
Expand All @@ -108,8 +105,7 @@ bean resolver cache.

Find a detail documentation of each plugin in the plugin project main README.md file.

Runtime overhead
----------------
### Runtime overhead
It really depends on how many frameworks you use and which caches are disabled. Example measurements
for a large, real world enterprise application based on Spring + Hibernate, run on Jetty.

Expand Down
2 changes: 1 addition & 1 deletion SpringPlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>SpringPlugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion TomcatPlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>TomcatPlugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ZkPlugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>ZkPlugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
</parent>

<artifactId>distribution</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.hotswap.agent.PluginManager;
import org.hotswap.agent.annotation.Plugin;
import org.hotswap.agent.distribution.markdown.MarkdownProcessor;
import org.hotswap.agent.util.IOUtils;
import org.hotswap.agent.util.scanner.ClassPathAnnotationScanner;
import org.hotswap.agent.util.scanner.ClassPathScanner;

Expand Down Expand Up @@ -71,6 +72,12 @@ public void scan() throws Exception {

addHtmlFooter(html);
writeHtml(new URL(getBaseURL(getClass()) + "/target/html/plugins.html"), html.toString());


String mainReadme = markdownProcessor.markdownToHtml(IOUtils.streamToString(new URL(
getBaseURL(getClass()) + "/../README.md"
).openStream()));
writeHtml(new URL(getBaseURL(getClass()) + "/target/html/README.html"), mainReadme);
}


Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.hotswap.agent</groupId>
<artifactId>HotswapAgentParent</artifactId>
<version>0.1-beta01</version>
<version>0.1-beta1</version>
<packaging>pom</packaging>

<name>Hotswap Agent Parent POM</name>
Expand Down

0 comments on commit 3750fa5

Please sign in to comment.