What if for the same public method, you should manage the database
differently? Oracle db management is not the same of MySQL (let's think to
database metadata). This is not possible with only one bean, unless you
create a method for each database, which seems absolutely CRAP.

Marco
----- Original Message ----- 
From: "James Hicks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 06, 2003 11:26 PM
Subject: RE: [Xdoclet-user] How to specify inheriting interfaces


> I would not use a session bean for each db.  I would instead use a
> single stateless session bean that implements your interface.  The
> ejbCreate method of your session bean could accept a parameter that
> determines which db to use.  The actual db implementation could be a
> POJO.
>
> James Hicks
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Marco
> Tedone
> Sent: Wednesday, August 06, 2003 3:44 PM
> To: xdoclet-users
> Subject: [Xdoclet-user] How to specify inheriting interfaces
>
>
> Hi, we are developing an unusual applicatoin, basically centered on
> session beans which manage database (not entity beans, because the data
> to be retrieved are dynamic). To make our application multi-database
> compliant, and following a pattern, we defined basically one Session
> bean for each used database (MySQL, Oracle, SQLServer, Postgresql and
> other could be added). The application then choose the right session
> bean depending on user selections and this is possible thanks to a
> common interface which all the database-specific interfaces inherit
> from. This way a client will have simply to get a reference to the
> super-interface (as the methods are common for every session bean) and
> polymorphism will be guaranteed. So far so good. So far we developed the
> session beans manually but now I would like to migrate to XDoclet, even
> because we are planning to develop other beans, and XDoclet will be of
> great help.
>
> As you will probably guess, our problem is how we could define via
> XDoclet that each database-specific interface will inherit from the
> common one (now is possible because all the interface was declared
> manually).
>
> Any help will be appreciated.
>
> Marco
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01
> /01
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to