-
1. Re: EJB3 as a server, android as a client
manthapavan Oct 3, 2012 11:22 PM (in response to magma917)Hi Li Yan
As part of your question, yes u need to install JBoss out side of your eclipse and configure that server path in Eclipse. installing JBoss doesn't mean u get server installed. regarding your android client intracting with server side EJB ill post it in few days.
Thanks.
-
2. Re: EJB3 as a server, android as a client
magma917 Oct 11, 2012 8:19 PM (in response to manthapavan)Hi, thanks for your instruction. May I ask how can I use EJB3 with JBoss as a server and Android application as a client. Thanks.
-
3. Re: EJB3 as a server, android as a client
manthapavan Oct 11, 2012 11:30 PM (in response to magma917)Hi Li Yan
once you have developed the EJB component and Android Activity. You can code a Servlet that will internally call EJB. From Android you are free to call Servlet using HttpURLConnection Class in the API.
pass the parameters to the servlet and from servlet pass them to EJB, and start your Business Logic.
String
urlString = "http://projectcontextpath/servletname"
URL url =
new
URL(urlString);
URLConnection connection = url.openConnection();
try
{
HttpURLConnection httpConnection = (HttpURLConnection) connection;
httpConnection.setRequestMethod(
"GET"
);
httpConnection.connect();
}catch(Exception e){
e.printStackTrace();
}
Hope This helps you. Happy Coding.
Thanks.