Mani,

Here's what you could do.

Set up a JMS queue.

Create an MDB which has the queue as its selected destination.

Write your MDB so that its 'onMessage' method never returns.

Send a single message to the queue.

Your MDB should now be always active trying to 'complete' processing
of the singleton message that you sent (the send must be once-only,
the message should never be received by a client or fully processed
by the MDB).

You are permitted to call session beans from an MDB.

mani wrote:

> hi all,
>
> i have an application which frequently polls the database for unsent
> messages, and then sends them.
>
> right now i have the following architecture,
>
> 1. I have configured my server(Jboss) for invoking a timerMBean(using
> javax.management.* classes) service at specified interval.
>
> 2. The timer bean when invoked calls a session beans
>
> 3. The session beans calls a findByStatus on an entity beans and retrieves
> all the unsent messages(xml string)
>
> 4. The session beans opens a URLConnection and sends the message to the
> specific server url
>
> Here step 1 is container dependent since i have to use
> org.jboss.util.ServiceMBeanSupport for the timerMBean. Can i invoke a timer
> service in a container independent way??
>
> And my other doubt is whether it is valid opening a URLConnection from an
> enterprise beans?? if not what is the work around??
>
> Any suggestions in this regard will be hightly appreciated..
>
> thanx in advance,
> mani
>
> ===========================================================================
> 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".
>
>
>


--
_______________________________________________________________________________

Evan Ireland            Sybase EAServer Engineering         [EMAIL PROTECTED]
                           Wellington, New Zealand                +64 4 934-5856

===========================================================================
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