Discussion:
[Middlegen-user] cmp/cmr with jboss
Gregory Joseph
2003-03-12 09:45:02 UTC
Permalink
Hi,

I've read in the archives someone saying to use fkcmp="false" in the cmp20
plugin to go around the jboss limitation that doesn't accept a field to be
both CMP and CMR. (which then results in duplicate column names in the create
table statements)
Although, that doesn't work for me, since this removes attributes from my
beans which are both primary key for that bean and a foreign key.

Is there any other work-around for this?

Thanks


greg
Kristoffer Moe
2003-03-12 12:33:04 UTC
Permalink
I've also struggled with a similar problem some time ago, and as far as I
can remember, I introduced a workaround by adding a new PK column, which
simply was an numeric id. This, of cource, is only possible if you have
control over the database schema.


Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate column
names in the create table statements)
Although, that doesn't work for me, since this removes attributes from
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,


Kristoffer Moe
Senior Consultant
Elan It ReSource
Steve
2003-03-12 21:12:13 UTC
Permalink
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline table
definition, I get an error during the struts compiliation. After I comment
out the
struts items, I get errors about my beans being incomplete.

Even if the airline sample does not work, does anyone have an example that
does compile and deploy on JBoss (preferably backed with MySQL) ? I don't
mind tweaking files or extra steps if someone knows what they are.

Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.

Thanks,

Steve

----- Original Message -----
From: "Kristoffer Moe" <***@bredband.no>
To: <middlegen-***@lists.sourceforge.net>
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far as I
can remember, I introduced a workaround by adding a new PK column, which
simply was an numeric id. This, of cource, is only possible if you have
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate column
names in the create table statements)
Although, that doesn't work for me, since this removes attributes from
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Kristoffer Moe
2003-03-13 07:16:12 UTC
Permalink
Well, I'm not very familiar with the airline example, but consider this:
say that you have a M:N relation between flight and passenger that make up
reservations. Some reservations are VIP reservations, and therefore take
part in another relationship with some VIP information table (e.g.
preferred color of window curtains adjacent to the reserved seat) I imagine
this may cause problems, as the only (and hence primary) key to the
reservations table is the compound flight/passenger combination, which is
also expected to take part in another relationship.

Introducing a (logically redundant) primary key column to the reservation
table makes it possible to isolate the relationships from one another.

Does this make any sense?

Kristoffer
Post by Steve
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table definition, I get an error during the struts compiliation. After
I comment out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an example
that does compile and deploy on JBoss (preferably backed with MySQL) ?
I don't mind tweaking files or extra steps if someone knows what they
are.
Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I can remember, I introduced a workaround by adding a new PK
column, which simply was an numeric id. This, of cource, is only
possible if you have control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate
column names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from my beans which are both primary key for that bean and a foreign
key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
Mvh/regards,


Kristoffer Moe
Senior Consultant
Elan It ReSource
Stefan Groschupf
2003-03-12 22:16:10 UTC
Permalink
Hi,
another question. Use the struts plugin use xdoclet for generation all
sources?
Since there are velocity templates it looks like it does not use xdoclet.

Is it possible to port the velocity templates to xdcolet templates?

Thanks for hints!
Stefan
Aslak Hellesøy
2003-03-13 05:58:17 UTC
Permalink
-----Original Message-----
Groschupf
Sent: 13. mars 2003 01:15
Subject: [Middlegen-user] stuts gernation
Hi,
another question. Use the struts plugin use xdoclet for generation all
sources?
Since there are velocity templates it looks like it does not use xdoclet.
Is it possible to port the velocity templates to xdcolet templates?
That's possible. XDoclet 1.2 uses a proprietary template language. XDoclet
2.0 (currently in alpha state) uses Velocity, so that might be simpler.

Aslak
Thanks for hints!
Stefan
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Yuri Kouzmov
2003-03-13 19:47:13 UTC
Permalink
Steve,

I feel your pain. I spent quite a bit of time on it before I was able to
succesfully use the airline sample. There were a couple changes I had to
make to get it working (more like compromises, actually):
1. Be sure to use fkcmp="false" setting in your build.xml
2. You now cannot use composite primary keys (where columns are part of
both the primary and foreign keys). So only RESERVATION_ID column is now
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.

After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like every
time you run MiddleGen gui, it saves it's settings in that file. If you
change the sql file and re-create the tables, it will still try to use
those old settings and will fail to compile everything. Delete the file
before you re-run MiddleGen after making schema changes.

BTW, I was using Oracle, but can't imagine that this wouldn't work for
MySQL as well.

I've done so many changes that I might have forgotten to mention
something. Let me know if this works.


Y.

-----Original Message-----
From: Steve [mailto:***@browsermedia.com]
Sent: Wednesday, March 12, 2003 3:12 PM
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] cmp/cmr with jboss

Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table
definition, I get an error during the struts compiliation. After I
comment
out the
struts items, I get errors about my beans being incomplete.

Even if the airline sample does not work, does anyone have an example
that
does compile and deploy on JBoss (preferably backed with MySQL) ? I
don't
mind tweaking files or extra steps if someone knows what they are.

Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.

Thanks,

Steve

----- Original Message -----
From: "Kristoffer Moe" <***@bredband.no>
To: <middlegen-***@lists.sourceforge.net>
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Russell Black
2003-03-13 20:07:11 UTC
Permalink
----- Original Message -----
Post by Yuri Kouzmov
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
I don't know if MySQL supports this, but some databases support deferring
constraint checking until the transaction is committed. This allaws you to
keep the NOT NULL constraints and still have it work on JBoss, since JBoss
commits the tranaction only after ejbPostCreate is called.

Russell
Matthias Flor
2003-03-14 06:24:01 UTC
Permalink
Post by Russell Black
Post by Yuri Kouzmov
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
I don't know if MySQL supports this, but some databases support deferring
constraint checking until the transaction is committed. This allaws you to
keep the NOT NULL constraints and still have it work on JBoss, since JBoss
commits the tranaction only after ejbPostCreate is called.
Are you sure?
I ran Oracle (9i) with deferrable constraints enabled but JBoss (3.2RC2)
chokes the same way as when they were not deferrable.
The easiest way is to allow the constraints to be nullable, as Yuri said.
AFAIK JBoss 4.0 will fix this issue with Oracle. IIRC MySQL and
HypersonicSQL don't choke on this.

regards,
Matthias
--
Matthias Flor <***@isb-ag.de>
Russell Black
2003-03-14 14:56:01 UTC
Permalink
Post by Matthias Flor
Post by Russell Black
Post by Yuri Kouzmov
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
I don't know if MySQL supports this, but some databases support deferring
constraint checking until the transaction is committed. This allaws you to
keep the NOT NULL constraints and still have it work on JBoss, since JBoss
commits the tranaction only after ejbPostCreate is called.
Are you sure?
No. I have not tried this, since I'm not using a database with this
capability. I'm just regurgitating something I read somewhere. But it does
surprise me that it doesn't work with deferrable constraints, because that
means ejbCreate and ejbPostCreate are called on two separate transactions,
which seems wrong to me.
Post by Matthias Flor
I ran Oracle (9i) with deferrable constraints enabled but JBoss (3.2RC2)
chokes the same way as when they were not deferrable.
The easiest way is to allow the constraints to be nullable, as Yuri said.
AFAIK JBoss 4.0 will fix this issue with Oracle. IIRC MySQL and
HypersonicSQL don't choke on this.
regards,
Matthias
--
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Steve
2003-03-14 19:05:08 UTC
Permalink
Yuri:

Thanks for the help. Everything generated and deployed without an error.

After it deployed, I connected to the generated struts pages. I was
able to create person's and flights, but trying to create a reservation had
a couple issues:

1) The reservation form did not have fields for person nor flight. Is this
a side-effect from our changes? Or is this just the status of the struts
plug-in and it exists for all app servers?

2) When I tried to save the reservation I got an Exception stating that
CMP is not yet implemented. Again, I do not know if this is just that the
struts plugin is still in development, or if the modifications have broken
something under the cover.

I would be curious to know if you saw the same behavior when you
worked with this.

I am just starting with Middlegen, so I am still unclear
on whether these issues are an indication of how far off the trail I
am venturing. Specifically, I am wondering how much support
(ie, docs, faq's, mail archives) will be applicable to my setup
as I start implementing my own non-sample code. I remain
optimistic that I can eventually understand Middlegen and the code
it (and xDoclets) produce.

Thanks for all your help,

Steve B.


----- Original Message -----
From: "Yuri Kouzmov" <***@clearcard.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Thursday, March 13, 2003 4:46 PM
Subject: RE: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I feel your pain. I spent quite a bit of time on it before I was able to
succesfully use the airline sample. There were a couple changes I had to
1. Be sure to use fkcmp="false" setting in your build.xml
2. You now cannot use composite primary keys (where columns are part of
both the primary and foreign keys). So only RESERVATION_ID column is now
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like every
time you run MiddleGen gui, it saves it's settings in that file. If you
change the sql file and re-create the tables, it will still try to use
those old settings and will fail to compile everything. Delete the file
before you re-run MiddleGen after making schema changes.
BTW, I was using Oracle, but can't imagine that this wouldn't work for
MySQL as well.
I've done so many changes that I might have forgotten to mention
something. Let me know if this works.
Y.
-----Original Message-----
Sent: Wednesday, March 12, 2003 3:12 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table
definition, I get an error during the struts compiliation. After I
comment
out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an example
that
does compile and deploy on JBoss (preferably backed with MySQL) ? I
don't
mind tweaking files or extra steps if someone knows what they are.
Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Russell Black
2003-03-14 20:44:08 UTC
Permalink
Steve,

I am currently using middlegen with JBoss. It took me a while to get things
going, but things are working well now. I was never able to get the struts
working, but I didn't need the struts. So it can be done.

Russell

----- Original Message -----
From: "Steve" <***@browsermedia.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Friday, March 14, 2003 2:04 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Steve
Thanks for the help. Everything generated and deployed without an error.
After it deployed, I connected to the generated struts pages. I was
able to create person's and flights, but trying to create a reservation had
1) The reservation form did not have fields for person nor flight. Is this
a side-effect from our changes? Or is this just the status of the struts
plug-in and it exists for all app servers?
2) When I tried to save the reservation I got an Exception stating that
CMP is not yet implemented. Again, I do not know if this is just that the
struts plugin is still in development, or if the modifications have broken
something under the cover.
I would be curious to know if you saw the same behavior when you
worked with this.
I am just starting with Middlegen, so I am still unclear
on whether these issues are an indication of how far off the trail I
am venturing. Specifically, I am wondering how much support
(ie, docs, faq's, mail archives) will be applicable to my setup
as I start implementing my own non-sample code. I remain
optimistic that I can eventually understand Middlegen and the code
it (and xDoclets) produce.
Thanks for all your help,
Steve B.
----- Original Message -----
Sent: Thursday, March 13, 2003 4:46 PM
Subject: RE: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I feel your pain. I spent quite a bit of time on it before I was able to
succesfully use the airline sample. There were a couple changes I had to
1. Be sure to use fkcmp="false" setting in your build.xml
2. You now cannot use composite primary keys (where columns are part of
both the primary and foreign keys). So only RESERVATION_ID column is now
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like every
time you run MiddleGen gui, it saves it's settings in that file. If you
change the sql file and re-create the tables, it will still try to use
those old settings and will fail to compile everything. Delete the file
before you re-run MiddleGen after making schema changes.
BTW, I was using Oracle, but can't imagine that this wouldn't work for
MySQL as well.
I've done so many changes that I might have forgotten to mention
something. Let me know if this works.
Y.
-----Original Message-----
Sent: Wednesday, March 12, 2003 3:12 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table
definition, I get an error during the struts compiliation. After I
comment
out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an example
that
does compile and deploy on JBoss (preferably backed with MySQL) ? I
don't
mind tweaking files or extra steps if someone knows what they are.
Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Steve
2003-03-14 22:09:01 UTC
Permalink
Russell and Yuri:

Thanks for the support. I will start diggin in this weekend.

I have created a couple of Struts apps in the past, so I hope
I can get around the struts hole.


Thanks again,
Steve

----- Original Message -----
From: "Russell Black" <***@iarchives.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Friday, March 14, 2003 5:38 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I am currently using middlegen with JBoss. It took me a while to get things
going, but things are working well now. I was never able to get the struts
working, but I didn't need the struts. So it can be done.
Russell
----- Original Message -----
Sent: Friday, March 14, 2003 2:04 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Steve
Thanks for the help. Everything generated and deployed without an error.
After it deployed, I connected to the generated struts pages. I was
able to create person's and flights, but trying to create a reservation
had
Post by Steve
1) The reservation form did not have fields for person nor flight. Is this
a side-effect from our changes? Or is this just the status of the struts
plug-in and it exists for all app servers?
2) When I tried to save the reservation I got an Exception stating that
CMP is not yet implemented. Again, I do not know if this is just that the
struts plugin is still in development, or if the modifications have broken
something under the cover.
I would be curious to know if you saw the same behavior when you
worked with this.
I am just starting with Middlegen, so I am still unclear
on whether these issues are an indication of how far off the trail I
am venturing. Specifically, I am wondering how much support
(ie, docs, faq's, mail archives) will be applicable to my setup
as I start implementing my own non-sample code. I remain
optimistic that I can eventually understand Middlegen and the code
it (and xDoclets) produce.
Thanks for all your help,
Steve B.
----- Original Message -----
Sent: Thursday, March 13, 2003 4:46 PM
Subject: RE: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I feel your pain. I spent quite a bit of time on it before I was able to
succesfully use the airline sample. There were a couple changes I had to
1. Be sure to use fkcmp="false" setting in your build.xml
2. You now cannot use composite primary keys (where columns are part of
both the primary and foreign keys). So only RESERVATION_ID column is now
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It looks
like they are inserted as NULL and then later updated with appropriate
values.
After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like every
time you run MiddleGen gui, it saves it's settings in that file. If you
change the sql file and re-create the tables, it will still try to use
those old settings and will fail to compile everything. Delete the file
before you re-run MiddleGen after making schema changes.
BTW, I was using Oracle, but can't imagine that this wouldn't work for
MySQL as well.
I've done so many changes that I might have forgotten to mention
something. Let me know if this works.
Y.
-----Original Message-----
Sent: Wednesday, March 12, 2003 3:12 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table
definition, I get an error during the struts compiliation. After I
comment
out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an example
that
does compile and deploy on JBoss (preferably backed with MySQL) ? I
don't
mind tweaking files or extra steps if someone knows what they are.
Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in the
cmp20 plugin to go around the jboss limitation that doesn't accept a
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a foreign key.
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Yuri Kouzmov
2003-03-14 19:41:07 UTC
Permalink
Steve,

I'm actually very new to this as well. I saw sidebar about MiddleGen in
an Ant book and decided to check it out.I spent about a week trying to
get things working w/ Jboss and actually gave up on it. I thought I had
tried everything, including getting Jboss out of CVS, making the changes
to source code (required to get around a known "duplicate column name"
issue) and making a custom build, to no avail. I decided to give it
another try earlier this week and finally got the sample working. I had
some problems getting an ejb from a real schema, but was able to fix it
w/ a couple hacks.

As far as I know, the issues mentioned in 1) and 2) are due to current
state of the struts plugin. I had to make my own test war file and
replace the one that is built and included w/ middlegen-generated ear.
In general, I discarted the middlegen struts stuff altogether because it
adheres to now seriously outdated version 1.0 of the framework (The 1.1
release candidate 1 is now out). It's still useful as a reference to get
started though, if you haven't used struts before.

It terms of support, you should be alright. I think that most of the
problems I ran into were due to my not really knowing much about
EJB/CMP/JBoss. Everyone seems pretty good about responding to questions
on the mailing list. As with any open source project, you'll probably
have to fiddle around yourself a bit.


Y.


-----Original Message-----
From: Steve [mailto:***@browsermedia.com]
Sent: Friday, March 14, 2003 1:05 PM
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] cmp/cmr with jboss

Yuri:

Thanks for the help. Everything generated and deployed without an error.

After it deployed, I connected to the generated struts pages. I was
able to create person's and flights, but trying to create a reservation
had
a couple issues:

1) The reservation form did not have fields for person nor flight. Is
this
a side-effect from our changes? Or is this just the status of the struts
plug-in and it exists for all app servers?

2) When I tried to save the reservation I got an Exception stating that
CMP is not yet implemented. Again, I do not know if this is just that
the
struts plugin is still in development, or if the modifications have
broken
something under the cover.

I would be curious to know if you saw the same behavior when you
worked with this.

I am just starting with Middlegen, so I am still unclear
on whether these issues are an indication of how far off the trail I
am venturing. Specifically, I am wondering how much support
(ie, docs, faq's, mail archives) will be applicable to my setup
as I start implementing my own non-sample code. I remain
optimistic that I can eventually understand Middlegen and the code
it (and xDoclets) produce.

Thanks for all your help,

Steve B.


----- Original Message -----
From: "Yuri Kouzmov" <***@clearcard.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Thursday, March 13, 2003 4:46 PM
Subject: RE: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I feel your pain. I spent quite a bit of time on it before I was able
to
Post by Yuri Kouzmov
succesfully use the airline sample. There were a couple changes I had
to
Post by Yuri Kouzmov
1. Be sure to use fkcmp="false" setting in your build.xml
2. You now cannot use composite primary keys (where columns are part
of
Post by Yuri Kouzmov
both the primary and foreign keys). So only RESERVATION_ID column is
now
Post by Yuri Kouzmov
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It
looks
Post by Yuri Kouzmov
like they are inserted as NULL and then later updated with appropriate
values.
After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like
every
Post by Yuri Kouzmov
time you run MiddleGen gui, it saves it's settings in that file. If
you
Post by Yuri Kouzmov
change the sql file and re-create the tables, it will still try to use
those old settings and will fail to compile everything. Delete the
file
Post by Yuri Kouzmov
before you re-run MiddleGen after making schema changes.
BTW, I was using Oracle, but can't imagine that this wouldn't work for
MySQL as well.
I've done so many changes that I might have forgotten to mention
something. Let me know if this works.
Y.
-----Original Message-----
Sent: Wednesday, March 12, 2003 3:12 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Do you recall any of the details? I am getting nowhere. It seems that
every fix introduces new errors. If I make any changes to the airline
table
definition, I get an error during the struts compiliation. After I
comment
out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an example
that
does compile and deploy on JBoss (preferably backed with MySQL) ? I
don't
mind tweaking files or extra steps if someone knows what they are.
Am I beating a dead horse here trying to use middlegen with JBoss at
this time? Are efforts under way to support JBoss with MySQL? It seems
to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false" in
the
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
cmp20 plugin to go around the jboss limitation that doesn't accept
a
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a foreign
key.
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Rod Macpherson
2003-03-18 18:12:10 UTC
Permalink
I understand the deferred constraint issue is going to be fixed in JBoss
4.0 if not sooner. IMO this is a major stumbling block in terms of
porting weblogic applications. We had to defer constraints and were able
to do that because we owned the schema. There are plenty of situations
where a change of that magnitude would never fly. I also think Middlegen
samples could be a lot better such as a CMP application for each
supported platform versus the current swiss-army example. Perhaps
somebody will contribute a simple ANT script for that since it spoon
feeding users is not a fate Alsak deserves after all his hard work on
giving us this tool.

-----Original Message-----
From: Steve [mailto:***@browsermedia.com]
Sent: Friday, March 14, 2003 4:08 PM
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] cmp/cmr with jboss


Russell and Yuri:

Thanks for the support. I will start diggin in this weekend.

I have created a couple of Struts apps in the past, so I hope
I can get around the struts hole.


Thanks again,
Steve

----- Original Message -----
From: "Russell Black" <***@iarchives.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Friday, March 14, 2003 5:38 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I am currently using middlegen with JBoss. It took me a while to get
things
Post by Yuri Kouzmov
going, but things are working well now. I was never able to get the
struts
Post by Yuri Kouzmov
working, but I didn't need the struts. So it can be done.
Russell
----- Original Message -----
Sent: Friday, March 14, 2003 2:04 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Steve
Thanks for the help. Everything generated and deployed without an
error.
After it deployed, I connected to the generated struts pages. I was
able to create person's and flights, but trying to create a
reservation
had
Post by Steve
1) The reservation form did not have fields for person nor flight.
Is
this
Post by Yuri Kouzmov
Post by Steve
a side-effect from our changes? Or is this just the status of the
struts plug-in and it exists for all app servers?
2) When I tried to save the reservation I got an Exception stating
that CMP is not yet implemented. Again, I do not know if this is
just that
the
Post by Yuri Kouzmov
Post by Steve
struts plugin is still in development, or if the modifications have
broken
Post by Yuri Kouzmov
Post by Steve
something under the cover.
I would be curious to know if you saw the same behavior when you
worked with this.
I am just starting with Middlegen, so I am still unclear
on whether these issues are an indication of how far off the trail I
am venturing. Specifically, I am wondering how much support (ie,
docs, faq's, mail archives) will be applicable to my setup as I
start implementing my own non-sample code. I remain optimistic that
I can eventually understand Middlegen and the code it (and xDoclets)
produce.
Thanks for all your help,
Steve B.
----- Original Message -----
Sent: Thursday, March 13, 2003 4:46 PM
Subject: RE: [Middlegen-user] cmp/cmr with jboss
Post by Yuri Kouzmov
Steve,
I feel your pain. I spent quite a bit of time on it before I was
able
to
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
succesfully use the airline sample. There were a couple changes I
had
to
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
make to get it working (more like compromises, actually): 1. Be
sure to use fkcmp="false" setting in your build.xml 2. You now
cannot use composite primary keys (where columns are part
of
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
both the primary and foreign keys). So only RESERVATION_ID column
is
now
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
part of the primary key.
3. You need to allow your foreign key columns to be NULL-able. It
looks
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
like they are inserted as NULL and then later updated with
appropriate values.
After you make these changes you should be good to go. Also, (I
mentioned this in another post), be sure to delete
airline-prefs.properties file in samples/src directory. Looks like
every
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
time you run MiddleGen gui, it saves it's settings in that file.
If
you
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
change the sql file and re-create the tables, it will still try to
use those old settings and will fail to compile everything. Delete
the
file
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
before you re-run MiddleGen after making schema changes.
BTW, I was using Oracle, but can't imagine that this wouldn't work
for MySQL as well.
I've done so many changes that I might have forgotten to mention
something. Let me know if this works.
Y.
-----Original Message-----
Sent: Wednesday, March 12, 2003 3:12 PM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Do you recall any of the details? I am getting nowhere. It seems
that every fix introduces new errors. If I make any changes to the
airline table definition, I get an error during the struts
compiliation. After I comment
out the
struts items, I get errors about my beans being incomplete.
Even if the airline sample does not work, does anyone have an
example that does compile and deploy on JBoss (preferably backed
with MySQL) ? I don't
mind tweaking files or extra steps if someone knows what they are.
Am I beating a dead horse here trying to use middlegen with JBoss
at this time? Are efforts under way to support JBoss with MySQL?
It seems to be a common configuration.
Thanks,
Steve
----- Original Message -----
Sent: Wednesday, March 12, 2003 9:31 AM
Subject: Re: [Middlegen-user] cmp/cmr with jboss
Post by Kristoffer Moe
I've also struggled with a similar problem some time ago, and as
far
as I
Post by Kristoffer Moe
can remember, I introduced a workaround by adding a new PK
column,
which
Post by Kristoffer Moe
simply was an numeric id. This, of cource, is only possible if
you
have
Post by Kristoffer Moe
control over the database schema.
Kristoffer
Post by Gregory Joseph
Hi,
I've read in the archives someone saying to use fkcmp="false"
in
the
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
cmp20 plugin to go around the jboss limitation that doesn't
accept
a
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
field to be both CMP and CMR. (which then results in duplicate
column
Post by Kristoffer Moe
Post by Gregory Joseph
names in the create table statements)
Although, that doesn't work for me, since this removes
attributes
from
Post by Kristoffer Moe
Post by Gregory Joseph
my beans which are both primary key for that bean and a
foreign
key.
Post by Yuri Kouzmov
Post by Steve
Post by Yuri Kouzmov
Post by Kristoffer Moe
Post by Gregory Joseph
Is there any other work-around for this?
Mvh/regards,
Kristoffer Moe
Senior Consultant
Elan It ReSource
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and the
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and the
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get
cracking and register here for some mind boggling fun and the chance
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! Get
cracking and register here for some mind boggling fun and the chance
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Loading...