File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes XML parsing in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "XML parsing in EJB" Watch "XML parsing in EJB" New topic
Author

XML parsing in EJB

sunil mirani
Ranch Hand

Joined: Jan 24, 2001
Posts: 36
Hi ,
I need help ....
My Question.
I need to parse through an XML file every 10 miniutes and insert the values into the db.
now this i have to do using EJB .
how do i parse through an XML file every 10 miniutes using ejB?
the bean must start parsing the file once deployed ..i think we can do this using some helper classes.. but i am not really sure
AND THIS TASK CANNOT BE DONE AT THE CLIENT OR SERVLET ..
how do i instanciate the bean on start up . so that it can start parsing the xml file..
multiple clients will access this bean so how do i prevent the bean from creating now objects of the helper class which will parse the xml file and send the value to the bean which will insert the values into the db ..
i know this is a little consfuing one ..`
please help !! ..
Sunil

[This message has been edited by sunil mirani (edited August 13, 2001).]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

You'll need to start a processor task that acts as an EJB client. How you do this depends on your server environment. In WebLogic, you might make this server be a WebLogic Startup Task using their timer services. In Unix, you could make this a stand-alone program run as a "cron" task.


Customer surveys are for companies who didn't pay proper attention to begin with.
sunil mirani
Ranch Hand

Joined: Jan 24, 2001
Posts: 36
hi Tim ,
can u please be more specific .
of you know some link where i could read more ..
thanks ,
Sunil
 
wood burning stoves
 
subject: XML parsing in EJB