In my reading of the EJB specs, books and articles, it does not seem to
be an easy matter to front end asynchronous msging systems with an EJB.
A simple example of such a system is a stock quote server that delivers
intraday prices changes to a client. Let's say I want to write an EJB that
generates an intraday price chart like those  you see at a number of web
sites that show the price movement of a stock at 5 minute intervals. This
removes the need for asynchronous delivery of msgs from the EJB to
the EJB client. The EJB home and remote interfaces would be something
like:

public interface IntradayChartHome extends EJBHome
{
 public IntradayChart create(String stockSymbol, int updateFreqInMins)
  throws RemoteException, CreateException;
}

public interface IntradayChart extends EJBObject
{
 public IntradayChartImage getChart() throws RemoteException;
}

My biggest sticking point is the integration of the intraday prices into the
EJB implementation. This entails connecting to a price server using a
multi-threaded asynchronous api for handling the proprietary msg protocol.
This type of code does not seem to be allowed to be used by 1.0 or 1.1 EJBs
in that it entails thread creation and thread synchronization as well as the
legacy code msging the EJB implementation object without going through
the EJB container.

Am I wrong in this read of the spec? Are others integrating this type of
data
service into EJB environments, and if so, how?

Thanks,
Scott Stark

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to