connecting from client aplication server to ejb server aplication
the ip of my pc where i put server aplication and client aplication is :
10.126.14.208 and i connect by http://10.126.14.208:8100/pos
the name of my jar componen server is pos.jar
the name of my database is POSJ
now i make my client aplication(servlet+JSP) on 10.126.14.206
what is the code in order to connectiong client aplication from
10.126.14.206 to server aplication on 10.126.14.208
here is one the code of my client aplication
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import javax.naming.*;
import java.util.*;
import com.pos.*;
import com.pos.customer.*;
public class SchedulerForShoppingCart extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
try {
InitialContext ic = new InitialContext();
ShoppingListHome home = (ShoppingListHome)
ic.lookup("java:comp/env/ejb/ShoppingListSession");
ShoppingList remote = home.create();
// Hapus keranjang belanja yang tidak aktif selama dua jam.
// Metode berikut akan menghapus keranjang belanja.
remote.removeOldShoppingList();
}
catch (Exception e) {
log(e.getMessage());
}
}
}