Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Creating App Server API

Reply
Thread Tools

Creating App Server API

 
 
Robert M. Gary
Guest
Posts: n/a
 
      02-13-2008
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
 
Reply With Quote
 
 
 
 
Mark Space
Guest
Posts: n/a
 
      02-13-2008
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?

 
Reply With Quote
 
 
 
 
Robert M. Gary
Guest
Posts: n/a
 
      02-13-2008
On Feb 13, 11:00*am, Mark Space <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating and debugging web app on remote server Joshua Ellul ASP .Net 1 08-21-2007 11:31 AM
creating a rails app within a rails app libsfan01 Ruby 2 02-05-2007 07:53 AM
Creating IIS Login to SQL Server in multi-tier app Ross ASP .Net Web Services 1 11-08-2004 05:50 PM
1 server, 2 web sites 1 asp.net app each, build one, other -> Server App Unavailable Dave Diehl ASP .Net 4 08-11-2004 12:52 PM
What API replaces the unlock API that existed in gcc 2.9.3? Shlomo Anglister C++ 1 08-02-2004 06:50 PM



Advertisments