Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

J2EE & Nokia on Serial Port

Options
  • 30-05-2005 4:46pm
    #1
    Registered Users Posts: 6,315 ✭✭✭


    I have a java app that connects to my phone to retrieve new messages and look for keywords in new messages. If it finds a keyword then it calls a method on my Stateful Session Bean.

    e.g. if it finds keyword 'SUB' it will add the senders mobile number to a list of subscribers.

    Should this code be running on my J2EE server or should it be in a seperate application?


Comments

  • Closed Accounts Posts: 1,322 ✭✭✭phobos


    Right correct me if I'm wrong, but from what you posted this is how I imagine your design...

    You have a standalone java app, using the JavaComm API talking to a mobile handset through a physical USB/Serial connection. This application is either polling the handset for new messages periodically, or you get asynchronous notifications. Either way when your app gets a handle to the new message's contents, it parses it for "SUB". This standalone java app is also a J2EE client application, which invokes methods on remote EJBs (Stateless Session beans) running on some application server. The session beans then talk to entity beans which, which ultimately take care of persisting your new data in an underlying datastore.

    Design wise I don't see any problem with what you have done. If your question is, "should the logic of the standalone java app reside in some middleware on the application server", I say NO!. It's fine as it is. Middleware components should not be talking directly to an underlying platform resource such as USB/Serial ports.

    Also if your question is "Do I need any of this to be running on an application server", I say the answer lies in what you want to do with the data in that datastore, how (many) people will concurrently interface with it, and the kind of UI you wish to provide, etc.

    What you've done so far can be implemented very quickly using standard J2SE techniques. But as I said it depends on the remaining system requirements that you haven't mentioned here that would determine IMO if you can justify the need for a middleware layer in your system.

    Hope that answers your question ;)

    ;-phobos-)


Advertisement