[jboss-user] [EJB3] - Re: EJB3 as a server, android as a client

Pavan Kumar Mantha do-not-reply at jboss.com
Thu Oct 11 23:29:42 EDT 2012


Pavan Kumar Mantha [https://community.jboss.org/people/manthapavan] created the discussion

"Re: EJB3 as a server, android as a client"

To view the discussion, visit: https://community.jboss.org/message/764489#764489

--------------------------------------------------------------
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 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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/764489#764489]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121011/8c5fb1d8/attachment-0001.html 


More information about the jboss-user mailing list