• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

HTMLReader EJB?

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I remember once seeing an example of an HTMLReaderEJB, that is, and EJB that opened a URL connection and got an InputStream and read the content. I think there was even a related question on one of the java certifications (J2EA?) once upon a time.
I need something like that now, as I want to call SOAP services from the EJB tier. But this problem keeps plaguing me, EJBs are forbidden from using the java.io package. (For good reason, they would have to wait on i/o!!!). Hence the question, can an EJB read from an HTML stream, and if so how?
My guess is that, if they once could in an earlier J2EE version, they no longer can. But what are the alternatives?
dt
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even though the specification suggests not to use java.io, you can use it. Just be aware of the fact that you're "on the edge" when it comes to spec-compliancy. Anyway, EJBs are allowed to use client sockets but not server sockets so reading HTML behind a URL or sending SOAP requests is fine.
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic