This week's book giveaway is in the Spring forum.
We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line!
See this thread for details.
Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • 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
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

XML in Session Beans

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently researching the design for an EJB component. One of the stipulations is that the processing of an XML document must occur on the server; however, I noticed the EJB specification forbids the inclusion of java.io.* symbols in session beans. Does anyone know of a work around?
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by empyrean:
I noticed the EJB specification forbids the inclusion of java.io.* symbols in session beans. Does anyone know of a work around?


How does this pose a problem for processing XML?
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
empyrean,
One more thing...
Thanks for joining JavaRanch, but could you take a quick look at the naming policy and edit your profile accordingly.
 
James McLean
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Mathews:

How does this pose a problem for processing XML?


Namely reading XML from a file. I probably should have stated that my problem has more to due with handling IO in session beans and less to do with the actual processing. BTW, thanks for redirecting me to the naming policy.
[ July 16, 2003: Message edited by: James McLean ]
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James McLean:

I probably should have stated that my problem has more to due with handling IO in session beans...


Where is this file located?
You can still ask your classloader to get an InputStream of a resource (file) located in your classpath.
You can still use a Client Socket to retrieve whatever resource via network.
Using file IO directly is still possible, if the AppServer allows it. But it's considered as bad practise, because it reduces the portability of your EJB. But if you don't care about portability simply test it, it might work.
Hmm, I shouldn't propagate bad practise :roll:
reply
    Bookmark Topic Watch Topic
  • New Topic