JRebel
- 3. План
Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel
- 4. Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel
- 5. java.lang.OutOfMemoryError: PermGen
space
java.util.zip.ZipException: error in
opening zip file
DEPLOYMENTS IN ERROR: Deployment
"vfszip:/D:/jboss-
5.1.0.GA/server/default/deploy/Enhanc
ed-QC-ejb.jar/" is in error due to
the following reason(s):
java.lang.IllegalStateException…
- 11. Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel
- 15. За кулисами
rebel.xml:
<application>
<classpath>
<dir name="C:/project/workspace/TestRebel/bin"/>
</classpath>
<web>
<link target="/">
<dir name="C:/project/workspace/TestRebel/webapp"/>
</link>
</web>
</application>
Опции сервера:
-javaagent:c:jrebeljrebel.jar
- 17. Пример
public class TestClient {
public TestClient() {
System.out.println("Constructor");
}
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
System.out.println("Hello");
}
}
- 18. Пример Constructor
Hello
public class TestClient { Hello
public TestClient() { JRebel: Reloading
System.out.println("Constructor"); class 'TestClient'.
} Hello2
Hello2
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
System.out.println("Hello2");
}
}
- 19. Пример Hello2
Hello2
public class TestClient { Hello2
private String field = “field value”; JRebel: Reloading
class 'TestClient'.
public TestClient() { field value
System.out.println("Constructor"); field value
}
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
newMethod();
}
private void newMethod() {
System.out.println(field);
}
}
- 22. JRebel Remote
На сервере
set JAVA_OPTS=-javaagent:/path/to/jrebel.jar
-Drebel.remoting_plugin=true
rebel-remote.xml:
<rebel-remote>
<id>MyFancyApplication</id>
<url>http://servername:8080/MyFancyApplication/</url>
</rebel-remote>
- 23. Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel
- 28. Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel
- 30. Пример Hello2
Hello2
public class TestClient { Hello2
private String field = “field value”; JRebel: Reloading
class 'TestClient'.
public TestClient() { field value
System.out.println("Constructor"); field value
}
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
newMethod();
}
private void newMethod() {
System.out.println(field);
}
}
- 31. Пример Hello2
Hello2
public class TestClient { Hello2
private String field = “field value”; JRebel: Reloading
class 'TestClient'.
public TestClient() { null
System.out.println("Constructor"); null
}
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
newMethod();
}
private void newMethod() {
System.out.println(field);
}
}
- 32. Пример Hello2
Hello2
public class TestClient { Hello2
private String field; JRebel: Reloading
class 'TestClient'.
public TestClient() { field value
System.out.println("Constructor"); field value
}
public static void main(String... args) {
TestClient client = new TestClient();
while (true) {
client.sayHello();
Thread.sleep(1000);
}
}
private void sayHello() {
newMethod();
}
private void newMethod() {
field = "field value";
System.out.println(field);
}
}
- 34. Редеплоймент - проблема?
Каким образом JRebel решает проблему
редеплоймента?
Стоимость и альтернативы
Практика использования JRebel
LiveRebel