Folks,


When I comment out mbeans in the jboss.jcml file, they don't get removed
from jboss-auto.jcml.
Why not? Do I have to comment out the beans in both?
I thought that the auto file was automatically generated?


P.S. Is it safe to remove the Hypersonic stuff as I don't use it?


Cheers - Adam.






-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 8:55 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] MDB...why?


Hello Peter:

Let's go with another example and you would say me
if (now, at last, thanks god ;-) am i in the correct way:

"An imaginary assumption: i wanna write an application to manage
a Mail List in this way:

Topic publisher side
------------------------------
A servlet obtains a lot of information (news) about 'Sport', 'Cinema'
and 'Computers'. This program sends messages to a Topic which
include 'subject', 'theme' and 'body' fields.

Topic subscriber side
---------------------------------
Three (diferent) listeners called 'listenSport', 'listenCinema' and
'listenComputers' wait for a message with its 'theme' field equals
to 'Sport', 'Cinema' or 'Computers', respectively.

Each Listener will call outers Session Beans which transform
the 'body' field in an HTML format (for Sports), PDF format (for Cinema)
and Plain-text format (for Computers) and then, every Session Bean send
an e-mail to [EMAIL PROTECTED], [EMAIL PROTECTED] or
[EMAIL PROTECTED]
with its respective attachment.

Everything will occur without 'bothering' the servlet. In the other hand,
writing 3 diferent Listeners will allow us to change (separately) the
formating task asociated to each Listener, and, in the future,
add new Listeners for new themes."

Regards:
__________________________________________
Jaume Soriano Sivera <[EMAIL PROTECTED]>
__________________________________________




[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
15/05/2001 21:43
Please respond to jboss-user


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Re: [JBoss-user] MDB...why?


On 14 Maj, [EMAIL PROTECTED] wrote:
> Thank you Per!!
>
> The origin of this confusion is a sample in JBoss Documentation,
> making more specific: example called "MDB as a Listener".
>
> How many "subscribers" appear in this example?
> I think a subscriber is 'Worker Bean', isn't it?
> Then, to have more than one subscriber i've to create other Beans
> similar (or not) to Worker Bean, haven't i?
> So, if i create new beans i have to modify my Listener to be able to
> comunicate with the new subscriber...

The ListenerBean is the subscriber. The logic is partitioned so that the
work is done in the stateless session  bean. Not that it is necesarry in
this example, but only to show how it is possible to do it.

When it commes to an MDB, you deploy one version (name, configuration)
for each logic and topic/selector combination.

Some areas to use this?

- A time task run in JMX could send its task to a queue. An MDB listens
  for missions and delegate to a sessiion bean (or does the work for
  itself).

- A bean get some cind of thing to do. To continue it need to wait one
  some cind of event (perhaps the presence of something). It triggers
  this and returns. A message bean listens on a queue where the event
  will be placed and calls the session bean (that perhaps has saves som
  temporary persistens data throug an entity bean from the earlier
  invokation, which it now uses.

//Peter
>
> Please, am i in the correct way?
>
> Thank you again!
> __________________________________________
> Jaume Soriano Sivera <[EMAIL PROTECTED]>
> __________________________________________
>
>
>
>
> Per Lewau <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
> 14/05/2001 13:08
> Please respond to jboss-user
>
>
>         To:     [EMAIL PROTECTED]
>         cc:
>         Subject:        Re: [JBoss-user] MDB...why?
>
>
>
> On Mon, 14 May 2001 [EMAIL PROTECTED] wrote:
>
>> Hi:
>> I'm testing JBoss with MDB but i'm still lost about its
>> utility...
>> I'd like to write an application to manage a little
>> "web-shop" using EJBs and MDBs as follows:
>>
>> * A java servlet who takes data from web application, i.e.
>>    the identifier of a client who wants to buy a book.
>>
>> * Before allowing this purchase i want to check if this client
>>    is not in my 'defaulter list'.
>>
>> * After this i'll be able to avoid/allow the purchase.
>>
>> Well, i though to do this:
>>
>> "The servlet takes data from web client and sends it to a Topic,
>> then Topic sends data to a Checker Bean that runs a method
>> called 'checkClient' wich look for this client in a 'defaulter'
> database.
>> If everything is ok, a 'true' value is returned to servlet"
>
> Sounds more like a Queue than a Topic to me. Queues are for
point-to-point
> messages and Topics are for Publisher/Subscriber (many receivers).
>
>> Is this a good way to pose my problem?
>> I know its possible to develope *the same* without MDBs, but,
>> is there any advantage on using MDBs?
>> in other words, how can i take advantage of MDBs?
>
> I'm not sure what you are trying to do, but this is my take on what you
> want.
>
> 0. MDB listens for messages on in queue
> 1. serlvet sends message to in queue with whatever should be checked
> 2. servlet waits for message on out queue
> 3. MDB.onMessage() called
> 4. MDB checks whatever
> 5. MDB sends message (true or false) to out queue
> 6. servlet receives message and proceeds
>
>
> I'd say that the advantage of MDBs is that they can be called
> asynchronously. What you want to do sound synchronous and while possible
> to do it just adds a lot of overhead. A session bean is easier and
faster.
>
> To me it seems as though MDBs are useful for triggering some action that
> you don't want to hang around waiting for. For instance, you might want
to
> send an email with an order confirmation and personally I wouldn't want
to
> hang around in my "process order" session bean waiting for JavaMail to
> finish (after all it is talking SMTP to a mail server somewhere) so I
> would simple put a message in a queue and let an MDB deal with the
sending
> of emails.
>
> Regards, Per
>
> -----------------------------------------------------------------------
> Per Lewau ([EMAIL PROTECTED])
>
> "Why waste time learning, when ignorance is instantaneous?"
>                  - Hobbes
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

--
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
Systems Architect        WWW: http://www.tim.se
Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
------------------------------------------------------------


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user




_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to