Yup. That's what I had to do to get it working last night. I ended up
building a CVS copy of MiddleGen to get sequences to work and then had
to configure JBoss (as described below) to deploy the EAR propertly.

I was new to EJB, MiddleGen, XDoclet and JBoss and wasn't sure what was
causing the problem. I've only had about 2 days to play with everything.

Thanx,


Y.


-----Original Message-----
From: Matthias Flor [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 6:37 AM
To: Yuri Kouzmov
Subject: Re: [Middlegen-user] Oracle Sequences

Yuri Kouzmov wrote:
> I think I'm back to the original problem: it's using HSQLDB instead of

> Oracle, and I really need to figure out why
> 
Well, it's not an Middlegen-issue, it's an JBoss issue. I had also some 
trouble as I started with jboss.
>  
> What changes do I have to make to the build file other than <!ENTITY 
> database SYSTEM "file:./config/database/oracle.xml"> at the top and 
> oracleSequence element in order to make it use Oracle?
> 
To use Oracle with JBoss fiddle in some files
First you need an oracle-service.xml in your
$JBOSS_HOME/server/default/deploy
(If you run JBoss with the -c option change 'deploy' to the value of
-c). There is an template oracle-service.xml in
$JBOSS_HOME/docs/examples/jca
Set the properties for ConnectionURL, DriverClass, Password and UserName
according to your needs.

In $JBOSS_HOME/server/default/conf/standardjaws.xml replace
   <datasource>java:/DefaultDS</datasource>
   <type-mapping>Hypersonic SQL</type-mapping>
with
   <datasource>java:/OracleDS</datasource>
   <type-mapping>Oracle8</type-mapping>

In standardjbosscmp-jdbc.xml (in the same directory) change
   <datasource>java:/DefaultDS</datasource>
   <datasource-mapping>Hypersonic SQL</datasource-mapping>
to
   <datasource>java:/OracleDS</datasource>
   <datasource-mapping>Oracle9i</datasource-mapping>

This should help. Start JBoss and have a look in the output if you get a
datasource named OracleDS properly installed.

This setup should run with the sequenceblock-Element.
Try this first before you proceed with oracle sequences!
If you want to use "real" oracle sequences you have to create a sequence
for each table ending with _SEQ. And enable the oraclesequence in the 
build-File.

Hope this helps.

regards,
Matthias
-- 
Matthias Flor <[EMAIL PROTECTED]>
------------------------------------------------------------------
ISB AG              Fon: +49 (0)721/82800-0
Karlstrasse 52-54   Fax: +49 (0)721/82800-82
D-76133 Karlsruhe   Web: http://www.isb-ag.de



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to