Discussion:
[Middlegen-user] patch 649515 - sequenceblock tag improvements
Ludovic Orban
2002-12-11 16:39:02 UTC
Permalink
Hi Aslak,

(for others please have a look at
https://sourceforge.net/tracker/?func=detail&atid=415992&aid=649515&group_i
d=36044 to get the context of this mail)

About item 3: OK too but that's a bit too simplistic. I mean my app server
doesn't allow you to lookup an EJB from another EJB without the java:comp
namespace. And you have to use the full jndi name to access an EJB from a
servlet.

So if I want Middlegen to use the sequenceblock pk generator, I can't use
anymore the UtilObject from my servlets...

There comes the political part: should you accept to patch item 3 or should
I ask the xdoclet team to change the generated UtilObject so both lookup
methods are available ?

Thanks,
Ludovic
Jon Finanger
2002-12-12 12:12:04 UTC
Permalink
I'm sure there are obvious reasons (yet for me unseen) for middlegen to remove the last letter in a hole lot of entities. E.g. The
Orderstatus table is intepreted into OrderstatuBean.java.
Any reason for that?

May that be the reason of this error messag?:
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: No ejb-relationship-ro
le-name element found, ObjectName: jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: No ejb-relationship-ro
le-name element found, ObjectName: jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED

-Jon
Aslak Hellesoy
2002-12-12 12:20:02 UTC
Permalink
-----Original Message-----
Finanger
Sent: 12. desember 2002 15:11
Subject: [Middlegen-user] cutting of my bean names
I'm sure there are obvious reasons (yet for me unseen) for
middlegen to remove the last letter in a hole lot of entities. E.g. The
Orderstatus table is intepreted into OrderstatuBean.java.
Any reason for that?
Middlegen tries to singularise/pluralise english words. When it fails, you
must tell it what to do:

http://sourceforge.net/mailarchive/forum.php?thread_id=1408018&forum_id=231
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help with JBoss in
JBoss' own forums?

Aslak
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Jon Finanger
2002-12-12 12:57:04 UTC
Permalink
Post by Aslak Hellesoy
Middlegen tries to singularise/pluralise english words. When it fails, you
any way of getting middlegen generate the tables in this table format for me? Manually this is a huuuge job :-)

-Jon
Hal Deadman
2002-12-12 13:47:04 UTC
Permalink
Isn't it generally understood to be poor naming to have plural names for
database tables? Middlegen should probably give people the benefit of the
doubt and assume that any table names ending in S are not plural. I can't
recall ever seeing a table that made it to production with a plural name.
The pluralization is still important for 1-M and M-M CMR relationship field
method names but table names should probably be left alone.

Hal
-----Original Message-----
Hellesoy
Sent: Thursday, December 12, 2002 9:19 AM
Subject: RE: [Middlegen-user] cutting of my bean names
Middlegen tries to singularise/pluralise english words. When
it fails, you
http://sourceforge.net/mailarchive/forum.php?thread_id=1408018
&forum_id=231
Post by Jon Finanger
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help
with JBoss in
JBoss' own forums?
Aslak
Post by Jon Finanger
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Aslak Hellesoy
2002-12-12 14:00:01 UTC
Permalink
-----Original Message-----
Deadman
Sent: 12. desember 2002 16:48
Subject: RE: [Middlegen-user] cutting of my bean names
Isn't it generally understood to be poor naming to have plural names for
database tables? Middlegen should probably give people the benefit of the
While I might agree with you, I dont't think that's the reality. I have
never seen a legacy database without plural names in the table. That's the
situation, Middlegen tries to deal with it. It manages to deal with it in
most situations, but not all.
doubt and assume that any table names ending in S are not plural. I can't
recall ever seeing a table that made it to production with a plural name.
The pluralization is still important for 1-M and M-M CMR
relationship field
method names but table names should probably be left alone.
Hal
-----Original Message-----
Hellesoy
Sent: Thursday, December 12, 2002 9:19 AM
Subject: RE: [Middlegen-user] cutting of my bean names
Middlegen tries to singularise/pluralise english words. When
it fails, you
http://sourceforge.net/mailarchive/forum.php?thread_id=1408018
&forum_id=231
Post by Jon Finanger
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help
with JBoss in
JBoss' own forums?
Aslak
Post by Jon Finanger
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Jon Finanger
2002-12-13 06:03:02 UTC
Permalink
How is middlegen going to do this decision in a proper way? Obviously it cant know that e.g. 'OrderStatus' is singularis unless it
have a dictinary of some kind. (I could of course change it to orderstate).
Unforunately there is a lot of non-pluraris words ending with a 's'.

I agree with Hal, reccomending the developer to not use pluraris is better. If they don't, its their problem. Yesterday i went
through my tables and changed some of them to sigularis - but still I have some tables ending with 's', which is not pluraris and
will never be :)

BTW: I cant find the sources in cvs neither on sourceforge (except for the Source XReference).

-Jon
-----Original Message-----
Hellesoy
Sent: 12. desember 2002 16:59
Subject: RE: [Middlegen-user] cutting of my bean names
-----Original Message-----
Deadman
Sent: 12. desember 2002 16:48
Subject: RE: [Middlegen-user] cutting of my bean names
Isn't it generally understood to be poor naming to have plural names for
database tables? Middlegen should probably give people the benefit of the
While I might agree with you, I dont't think that's the reality. I have
never seen a legacy database without plural names in the table. That's the
situation, Middlegen tries to deal with it. It manages to deal with it in
most situations, but not all.
doubt and assume that any table names ending in S are not plural. I can't
recall ever seeing a table that made it to production with a plural name.
The pluralization is still important for 1-M and M-M CMR
relationship field
method names but table names should probably be left alone.
Hal
-----Original Message-----
Hellesoy
Sent: Thursday, December 12, 2002 9:19 AM
Subject: RE: [Middlegen-user] cutting of my bean names
Middlegen tries to singularise/pluralise english words. When
it fails, you
http://sourceforge.net/mailarchive/forum.php?thread_id=1408018
&forum_id=231
Post by Jon Finanger
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help
with JBoss in
JBoss' own forums?
Aslak
Post by Jon Finanger
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2002-12-13 07:46:01 UTC
Permalink
The following command gets stuff from cvs:

cvs -z3 -d:pserver:***@cvs.middlegen.sourceforge.net:/cvsroot/middlegen co middlegen

The sources you're interested in here i think would be:

src/java/middlegen/Util.java - Methods performing the
singularize/pluralize stuff.

src/java/middlegen/javax/JavaTable.java - Base table class using these
util methods.

.eivind
Post by Jon Finanger
How is middlegen going to do this decision in a proper way? Obviously it cant know that e.g. 'OrderStatus' is singularis unless it
have a dictinary of some kind. (I could of course change it to orderstate).
Unforunately there is a lot of non-pluraris words ending with a 's'.
I agree with Hal, reccomending the developer to not use pluraris is better. If they don't, its their problem. Yesterday i went
through my tables and changed some of them to sigularis - but still I have some tables ending with 's', which is not pluraris and
will never be :)
BTW: I cant find the sources in cvs neither on sourceforge (except for the Source XReference).
-Jon
-----Original Message-----
Hellesoy
Sent: 12. desember 2002 16:59
Subject: RE: [Middlegen-user] cutting of my bean names
-----Original Message-----
Deadman
Sent: 12. desember 2002 16:48
Subject: RE: [Middlegen-user] cutting of my bean names
Isn't it generally understood to be poor naming to have plural names for
database tables? Middlegen should probably give people the benefit of the
While I might agree with you, I dont't think that's the reality. I have
never seen a legacy database without plural names in the table. That's the
situation, Middlegen tries to deal with it. It manages to deal with it in
most situations, but not all.
doubt and assume that any table names ending in S are not plural. I can't
recall ever seeing a table that made it to production with a plural name.
The pluralization is still important for 1-M and M-M CMR
relationship field
method names but table names should probably be left alone.
Hal
-----Original Message-----
Hellesoy
Sent: Thursday, December 12, 2002 9:19 AM
Subject: RE: [Middlegen-user] cutting of my bean names
Middlegen tries to singularise/pluralise english words. When
it fails, you
http://sourceforge.net/mailarchive/forum.php?thread_id=1408018
&forum_id=231
Post by Jon Finanger
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help
with JBoss in
JBoss' own forums?
Aslak
Post by Jon Finanger
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Aslak Hellesoy
2002-12-13 11:12:03 UTC
Permalink
-----Original Message-----
Finanger
Sent: 13. desember 2002 09:02
Subject: RE: [Middlegen-user] cutting of my bean names
How is middlegen going to do this decision in a proper way?
Middlegen can do the decision in a proper way when someone writes an
algorithm that knows about all ortography rules for English (and preferrably
all other languages on the planet) -Or when somebody bundles a dictionary
with it. -Until then, you can tell Middlegen how to pluralise and
singularise particular words. Here is the link (again) to an earlier post on
the same subject. In that post you'll find a link to the solution.

http://sourceforge.net/mailarchive/forum.php?thread_id=1408018&forum_id=231

Aslak
Obviously it cant know that e.g. 'OrderStatus' is singularis unless it
have a dictinary of some kind. (I could of course change it to
orderstate).
Unforunately there is a lot of non-pluraris words ending with a 's'.
I agree with Hal, reccomending the developer to not use pluraris
is better. If they don't, its their problem. Yesterday i went
through my tables and changed some of them to sigularis - but
still I have some tables ending with 's', which is not pluraris and
will never be :)
Sure, if you have the luxury. -But try to say that to the DBA of a legacy
database. He'll probably just stare at you ;-)
BTW: I cant find the sources in cvs neither on sourceforge
(except for the Source XReference).
http://sourceforge.net/cvs/?group_id=36044
(middlegen module)

-Or did I misunderstand what you were looking for?

Aslak
-Jon
-----Original Message-----
Hellesoy
Sent: 12. desember 2002 16:59
Subject: RE: [Middlegen-user] cutting of my bean names
-----Original Message-----
Deadman
Sent: 12. desember 2002 16:48
Subject: RE: [Middlegen-user] cutting of my bean names
Isn't it generally understood to be poor naming to have
plural names for
database tables? Middlegen should probably give people the
benefit of the
While I might agree with you, I dont't think that's the reality. I have
never seen a legacy database without plural names in the table.
That's the
situation, Middlegen tries to deal with it. It manages to deal
with it in
most situations, but not all.
doubt and assume that any table names ending in S are not
plural. I can't
recall ever seeing a table that made it to production with a
plural name.
The pluralization is still important for 1-M and M-M CMR
relationship field
method names but table names should probably be left alone.
Hal
-----Original Message-----
Behalf Of Aslak
Hellesoy
Sent: Thursday, December 12, 2002 9:19 AM
Subject: RE: [Middlegen-user] cutting of my bean names
Middlegen tries to singularise/pluralise english words. When
it fails, you
http://sourceforge.net/mailarchive/forum.php?thread_id=1408018
&forum_id=231
Post by Jon Finanger
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accessprofileit
emLocalHome,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: No
ejb-relationship-ro
jboss.j2ee:jndiName=smartpool.Accounttransact
ionLocalHome,service=EJB
state: FAILED
I don't see how that could be related. Maybe you can get help
with JBoss in
JBoss' own forums?
Aslak
Post by Jon Finanger
-Jon
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance
Computing Channel
Post by Jon Finanger
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Jon Finanger
2002-12-16 06:37:01 UTC
Permalink
FYI:
Regarding this issue it was solved by just changing the values in the property: cmp20.<table>.base-class-name=
in the samples/src/<database>-prefs.properties.

-Jon

Loading...