Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet and messaging

 
Gerome Kawa
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to develop a small application with the following requirement:

I need a servlet(or any java program) which will run in tomcat, waiting to receive XML files form another application B. Once an XML message is received my application will store the XML in a database and send back a message to B.

I am lost about where to start and how to go ahead.
Will it be possible for anyone to give me some idea, sketch, skeleton of how to go ahead ?

Your help will be deeply appreciated.

Thanks
Kawa
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you've described the inner workings of your servlet quite well. Now all you have to do is translate it into code.

That part is your job, if you run into trouble with well specified parts of that process people will be happy to give you assistance for those specific problems but don't expect us to write the whole thing for you...
 
Gerome Kawa
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know do I need to use JMS (I haven't used it before)?

- What do i need to write to receive XML ?
- How do I write it to dB ( Do I need to write entity bean for this? )
- How do i send a message back to the sender (app B) that the an XML is received ?

I am not asking someone to write it for me , but I would like someone to drive and give me some input of how to go about with it .


Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

- What do i need to write to receive XML ?
- How do I write it to dB ( Do I need to write entity bean for this? )
- How do i send a message back to the sender (app B) that the an XML is received ?

  • have a look at javax.jms.TextMessage, plus javax.jms.Topic or javax.jms.Queue
  • You don't need an Entity Bean, though feel free to use one if you like. You may also consider JDBC, JDO or an ORM layer (Toplink, Hibernate etc.)
  • Read javax.jms.Message. It covers how delivery can be acknowleded.

  •  
    Gerome Kawa
    Ranch Hand
    Posts: 61
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Does anybody know of any link which shows how to read an file(XML), acknowledge receipt and store the file in a folder in the filesystem.
     
    Mark Spritzler
    ranger
    Sheriff
    Posts: 17278
    6
    IntelliJ IDE Mac Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    "G Kawa"-
    Welcome to the JavaRanch! Please adjust your displayed name to meet the

    JavaRanch Naming Policy.

    You can change it

    here.

    Thanks! and welcome to the JavaRanch!

    Mark
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic