Creating App Server API

Discussion in 'Java' started by Robert M. Gary, Feb 13, 2008.

  1. I have a customer that is asking all his vendors to provide their
    API's via a Web Container. My marketing guy seems to believe this
    would be useful for other customers.
    Much of the API can be provided to the customer in the form on session
    bean, whereby I can provide the customer a bean that would then go out
    to my network product and retrieve data.
    However, another facet of our product is that the customer needs to be
    able to be notified of network events. Typically this would be done in
    an API but having them register an interface that I would call with
    the data after I've done some processing on it.
    However, I don't see any design patterns whereby I can provide that
    funtionality in a container. Because I don't have control over the
    lifetime of an enterprise bean in a container I can't (I don't think)
    have a long lived bean that provides this service and then calls the
    customer's interface for notification. I'm also not suppose to spawn
    threads from an enterprise bean. I've also looked at just providing
    the data via JMS. If I produce the JMS message within the container
    though I still have the same problem of needing a long lived bean in
    the container to listen on the socket, do the processing, and then
    produce on the JMS. It doesn't appear I can produce the JMS message
    from the remote network based process because of very specific
    security requirements on the transport mechanism. some containers
    offer some security but none of them appear to meet the requirements
    imposed on me such that I can transport customer data across a network
    with it.

    So, I'm looking for other design pattern ideas whereby I can provide a
    notification mechanism to a customer that runs in an App server.
    Although I can't write this to a specific App Server (without limiting
    what other customers may want) this particular customer is running
    WebSphere.

    -Robert
    Robert M. Gary, Feb 13, 2008
    #1
    1. Advertising

  2. Robert M. Gary

    Mark Space Guest

    Robert M. Gary wrote:

    > So, I'm looking for other design pattern ideas whereby I can provide a
    > notification mechanism to a customer that runs in an App server.
    > Although I can't write this to a specific App Server (without limiting
    > what other customers may want) this particular customer is running
    > WebSphere.


    Maybe I'm being naive here but I think you should look into
    javax.servlet.ServletContextListener for this. Install your network
    widget in the contextInitialized() method and remove it when
    contextDestroyed() is invoked.

    If you're looking for a network API through the container, nothing comes
    to mind. You might just have to use plain old Java for that. Or worst
    case JNI. Which will definitely be non-portable with out a lot (!) of work.

    What sort of network events are you trying to report on?
    Mark Space, Feb 13, 2008
    #2
    1. Advertising

  3. On Feb 13, 11:00 am, Mark Space <> wrote:
    > Robert M. Gary wrote:


    > Maybe I'm being naive here but I think you should look into
    > javax.servlet.ServletContextListener for this.  Install your network
    > widget in the contextInitialized() method and remove it when
    > contextDestroyed() is invoked.


    I think my challenge though is that I would need to have something
    long lived in the App Server to generate this notification to my
    clients. My code needs to listen on an SSL socket, do some
    computation, and then notify the customer's (bean, JMS, whatever).

    > If you're looking for a network API through the container, nothing comes
    > to mind.  You might just have to use plain old Java for that.  Or worst
    > case JNI.  Which will definitely be non-portable with out a lot (!) of work.
    >
    > What sort of network events are you trying to report on?


    The events are already normalized by our remote traditional Java based
    process running remote on the network. I'm really just trying to get
    those events into something I can notify a customer's code in an App
    Server on. Normally these events go into our own Rule's based engine
    where the customer writes 3G rules based on the events. This
    particular customer is asking for that same information to be provided
    to his own Java code in an App Server.

    -robert
    Robert M. Gary, Feb 13, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Diehl
    Replies:
    4
    Views:
    799
    Dave Diehl
    Aug 11, 2004
  2. Shlomo Anglister
    Replies:
    1
    Views:
    407
    Default User
    Aug 2, 2004
  3. Joshua Ellul
    Replies:
    1
    Views:
    346
  4. Ross

    Creating IIS Login to SQL Server in multi-tier app

    Ross, Nov 6, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    141
    Dino Chiesa [Microsoft]
    Nov 8, 2004
  5. libsfan01
    Replies:
    2
    Views:
    156
    Jan Svitok
    Feb 5, 2007
Loading...

Share This Page