Best way to use existing beans in combined flow

Daniel Lutz daniel.lutz at switch.ch
Tue Aug 25 05:24:57 EDT 2015


In our upcoming implementation for SPNEGO/Kerberos, one flow is a
combined login flow for username/password login or SPNEGO/Kerberos login
through a single web page.

To implement this, I created a new flow that is a merge of two other standalone
flows ("authn/Password" and a standalone "authn/SPNEGOKerberos").
That is, I use the existing actions of the other flows, but with
different ordering and transitions.

As I re-use a lot of actions from the two other flows, my first try was
to just include the existing beans in my new flow, like this:

<flow ...>
    ....

    <bean-import resource="password-authn-beans.xml" />
    <bean-import resource="spnego-kerberos-authn-beans.xml" />
</flow>

This worked so far. But I'm not sure whether this is the right way to
do it.

Tom Zeller once recommended that I define separate beans having the
existing beans as parents. But this would require choosing new
names for the children beans, and so the actions in my combined
flow would have other names than the same actions in the standalone
flows. I would prefer to avoid this.

Which strategy do you recommend me?

Cheers,
Daniel


More information about the dev mailing list