Use interfaces which both (client and bean use as home and remote)
Burkhard
----- Original Message -----
From: "Chris Adams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 3:17 PM
Subject: [JBoss-user] Casting home interface to correct bean type
> Hi,
>
> Need some help with remote casting objects when using ejb's
>
> I'm going to have a set of bean which each represent a form. Each for has
> the same set of methods, but they need to be independent ejb's because
each
> has different details.
>
> The client is a servlet, which will receive a parameter
> the type of form to return. This then needs to get the home interface of
> the bean. I am going to have a properties file which pairs the form name
to
> it's home interface class name.
>
> My problem is that the lookup method just returns an object, so how can I
> cast this object to the correct home interface, as the type of form is not
> know until the servlet is called.
>
> I've tried creating standard interfaces, which all form beans could
inheret
> from, but came up with all sort of problems.
>
> I could use relfection to call the methods, but would prefer not to. Any
> ideas.
>
> Many Thanks
>
> Chris Adams
>
>
>
>
> Chris Adams
> ==============================
> Regus Computer Services Ltd
> Direct Line: 01279 712010
> ESN: 6-741-2010
> Switchboard ESN: 6-741-2000
> Tel: +44 (0)1279 507988
> Fax: +44 (0)1279 507783
> E-mail: [EMAIL PROTECTED]
> <http://47.137.128.160/regus>
> <http://www.regus-cs.co.uk/>
> ==============================
>
>
>
>
> Regus Computer Services Ltd.
> The information transmitted is intended solely for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any retention, review, retransmission, dissemination, other use,
> or taking any action relying on this information by persons or entities,
> other than the intended recipient is prohibited. If you received this in
> error, please contact the sender and delete the material from any
computer.
> We will not be liable for direct, indirect or consequential damages
arising
> from the alteration of the contents of this e-mail by a third party or as
a
> result of any virus.
>
> _______________________________________________
> 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