• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB to servlet communication possible?  RSS feed

 
Dustin Whitte
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible for an EJB to open a URLConnection and communicate with a servlet? I have yet to see a working implementation.
thanks,
-D
 
john smith
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you want to? What is it you are trying to do?
 
Dustin Whitte
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We need to communicate with another application within our EJB. I would like to hit a servlet that this other application provided and pass it some parameters. Is that possible?
 
Tonny Tssagovic
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dustin Whitte:
Is that possible?

Yes, it is possible and there are no problems with that. However, why wouldn't u connect directly to the backend of that Servlet and bypass it?
But anyway, it is possible, although it is preferable to use some kind of "standards" to communicate between your apps. For example, you could send SOAP messages to your Servlet instead of using your own home made format. And your Servlet will be exposing your application as a web service.
 
Dustin Whitte
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply..... Are there any good resources or working code examples to show how this can be done?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!