When you say decoupled callbacks, that sounds to me like it can be done by
sending JMS messages.
Regards,
Hiram
----- Original Message -----
From: "Peter Braswell" <[EMAIL PROTECTED]>
To: "jBoss Developer" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 6:02 PM
Subject: [jBoss-Dev] JCTS thought was, Testing bean security with JUnit
> Alexander/All,
>
> During my course of developing Junit conformity tests
> for JBOSS, I too have encountered issues such as you
> are describing.
>
> For example, I would like to confirm that proper
> callbacks on the container side are being called at
> the appropriate time, many times without the explicit
> involvement of the client. Let's say for instance I
> wanted a stateful session bean to hang around until it
> is passivated by the container, then activated. It
> would be nice to confirm that the proper callbacks are
> invoked by the container on the target bean. This can
> be implicitly tested (does my bean have the same state
> it did before passivation?) via the client evaluating
> the beans state post passivation. But the zillion
> dollar question: How does the client know his/her bean
> has been passivated. Obviously, the client isn't
> suppose to but this makes for difficult verification
> of whether the appropriate callbacks are indeed
> invoked...
>
> My thought and it might be a crazy one because it may
> carry along with too much baggage is JavaSpaces. It
> seems to fit the bill for this particular problem:
>
> - I want to decouple the two entities (client/bean)
> - I want to have time independent processing (client
> waits until an entry was placed in the space regarding
> his beans passivation and takes appropriate action)
> - Bean does not know about the client and there is no
> coupling between them.
> - A VERY minimal amount of code needs to be written to
> make this "decoupled callback" work.
> - It may open the door for some interesting
> statistical analysis with minimally invasive code...?
>
> Thoughts?
>
> happy hacking,
> peter
>
>
> --- Alexander Klyubin <[EMAIL PROTECTED]>
> wrote:
> > Hi!
> >
> > Has somebody figured out how to test bean security
> > on the client side with
> > JUnit? My problem is that I want to test whether
> > security works as it should
> > for certain beans' methods (by the business rules).
> > In case access is denied
> > to client with particular roles/principal how do I
> > know (in the client code)
> > whether RemoteException is connected to security or
> > to other problems? Can I
> > somehow differentiate between these two types of
> > remote exceptions caught on
> > the client side without parsing exception text?
> >
> > Alexander Klyubin
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
>