On Thu, 2003-11-27 at 07:58, Jon Scarborough wrote:
> I'm working on an application on JBoss where I'll need to support
> multiple databases (Oracle, SQLServer, and probably DB2).
>
> I'm looking for a way to add database specific versions of tags to an
> EJB source file and generate a deployment descriptor for each database
> the app will support. For example, something along the lines of:
>
> @jboss.sql.type.oracle type="TYPEX"
> @jboss.sql.type.sqlserver type="TYPEY"
>
> I expect I'll probably need to implement some database specific finders
> as well.
>
> Is there a simple way to do this other than cracking open and tinkering
> with the jboss xdoclet module?
Ant properties, perhaps? XDoclet supports the use of these in the tags.
If you're going to generate multiple DDs, you're going to have to run
the task/subtask multiple times. So, just use e.g.
@jboss.sql type="${jboss.sql.typex}"
in your tag, and before each run of the task have it read in a different
properties file, where the different properties file have the relevant
values each database. No need for any tinkering.
At least, that's the theory. I've never actually tried it myself, so
your mileage may vary... Let us know how you get on.
Andrew.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user