praktikum1/aufgabe1

This commit is contained in:
2026-04-17 10:23:25 +02:00
parent 32f7cd07d9
commit b6de6840d3
9 changed files with 62 additions and 5 deletions
@@ -11,7 +11,7 @@ public class Client {
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
InitialContext ctx = new InitialContext(props);
String jndiName = "ejb:/ejb-uebung-1.0-SNAPSHOT/Encryptor!org.example.demo.uebung1.aufgabe16.EncryptorRemote";
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/Encryptor!org.example.demo.uebung1.aufgabe16.EncryptorRemote";
EncryptorRemote encryptor = (EncryptorRemote) ctx.lookup(jndiName);
String original = "Hallo Welt";
@@ -11,7 +11,7 @@ public class Client {
props.setProperty(Context.PROVIDER_URL, "http-remoting://localhost:8080");
InitialContext ctx = new InitialContext(props);
String jndiName = "ejb:/ejb-uebung-1.0-SNAPSHOT/Counter!org.example.demo.uebung1.aufgabe17.CounterRemote?stateful";
String jndiName = "ejb:/ejb-server-1.0-SNAPSHOT/Counter!org.example.demo.uebung1.aufgabe17.CounterRemote?stateful";
CounterRemote counter = (CounterRemote) ctx.lookup(jndiName);
System.out.println(counter.getAndIncrement());