ejb-ql

2002-03-01 Thread Michael Østergaard Jensen

When will Orion have full-support for ejb-ql?

It would be nice to specify the finder-queries by ejb-ql instead of 
specifying the queries in orion-ejb-jar.xml

System Developer
Michael Østergård Jensen

CIM Industrial Systems A/S
Kildegården 3
DK-7600 Struer
Denmark
Phone +45 96 84 05 00
Mobile +45 61 39 31 19
Fax +45 97 84 10 11
mailto:[EMAIL PROTECTED]
http://www.cim.as






Entity relationship and EJB QL thoughts

2002-02-19 Thread tibor . hegyi

Hi, 

I'm a bit disappointed about Entity relationships and EJBQL. What used to
seem to be simple, now it is a nightmare.

How can I achieve lazy loading of related EBs in Orion?

For instance, there's an EB (EB1) that has 1..N relationship to another
(EB2). If I lookup an instance of EB1 do all the related instances of EB2
load at the same time, even if I do not need to access them?

A bit off-topic (as EJB QL is not available in Orion so it is impossible to
develop something general, really portable), but I'm curious about the
issue:

Do you think that Entity relationships and EJB QL could be as optimized as
smart finder methods? I wish I could supply finders with SQL SELECTs...
Unfortunately, you have the drawback of EJBQL that you're limited to refer
to EBs (abstract schemas).

So, a more complex case: 

I have to model the following situation:
M..N relationship between Users and Countries. Each country belongs to one
region (region id is a column in the country table). I have to lookup those
countries that belong to the regions of the countries mapped to a user. So
it's not only a simple relationship between users and countries, but I'd
need a countr-country 1..N relationship over the region id.
Therefore the EJB QL would look like this for a finder method:

SELECT OBJECT(rc)
FROM User AS u, IN(u.countries) c, IN(c.regionCountries) rc
WHERE u.userID = ?1

With one smart SQL SELECT it would be possible to retrieve the result set
but how will servers manage the above situation?


regards, please give me a hint with the first Orion-specific question,
thanks,

Tibor




Orion and EJB2.0 (EJB QL)

2001-10-17 Thread Stefan Marx


Hi,

currently I have to decide wich way to go with a new EJB Project.

We need some App-Server independance so we have to decide if we should use
CMP with the EJB2.0 Relationships and QL or BMP with our own SQL-Statements.

Is there any information available when Orion will support EJB2.0 and EJB QL
(Query language)? I can also use a Beta Release for the next 3 Months so I'm
not sticked on official Releases.

Regards Stefan





RE: Orion and EJB2.0 (EJB QL)

2001-10-17 Thread Curt Smith


 Is there any information available when Orion will support EJB2.0 
 and EJB QL

My thoughts on CMP vs BMP:
On my project I went with BMP + DAO patterns + business deligates
at the client tier that deligate reads to the much more efficient
DAO's (direct access to the DB) and updates to transactional 
components (entities mediated by session beans).

With CMP you don't have the higher performance choice at the
client business deligate level to go directly to the DB via
DAO's, all reads have to go through the transactional tier
(for no good reason except to boost the stock of your appserver
and hardware vendors).

My personal opinion about CMP, that I'd like to hear other's 
experience on is that you'll spend almost as much time developing and
debugging QL as you would DAO+SQL.  You'll loose the much higher
performance direct access to the DB for read operations.  Given
that most web site pages are doing read, (display of catalogue
pages) use of CMP for reads through entities makes no sense unless
a slow web site is desired.

Any thoughts?

thanks,  curt






Re: EJB-QL in 1.4.7

2001-02-13 Thread Jim Archer

No.

--On Monday, February 12, 2001 11:02 PM -0600 Christian Billen 
[EMAIL PROTECTED] wrote:

 Is there any implementation of EJB-QL at this time in the 1.4.7 code?

 Thanks,

 Christian









EJB-QL Support

2001-01-20 Thread Globetrot Communications

It doesn't look like Orion 1.3.8 supports EJB-QL. If
true, are there any plans to make this available? When?

=
__
5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No other charges
4 cents Domestic calls with no fees:
5 cents per minute International calls also available
http://globetrot.hypermart.net
e-mail: [EMAIL PROTECTED]
__

__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/




Re: EJB QL and container managed relationships

2000-10-01 Thread Karl Avedal

Hello Jeff,

EJB QL is not supported yet, the EJB 2.0 PD support is just partial so far.
When EJB QL is available we will announce it.

Regards,
Karl Avedal

Jeff Schnitzer wrote:

 Hello folks.  Once again I have some questions, this time about EJB QL.

 The quick version is:  How sophisticated is the current Orion support
 for EJB QL?  I want to define a finder query on a field which is the
 mapping field of a CMR relationship, but it doesn't seem to work.

 Here's the long version:

 I'm using EJB 2.0 CMR fields to map a relationship between two entity
 beans, called Member and MemberName.  The primary key for the MemberName
 is (not surprisingly) a string, and every Member has a MemberName as
 defined by the following relation:

   ejb-relation
ejb-relation-name Member-canonical-MemberName /ejb-relation-name
description
 This is a unidirectional one-to-one mapping from Member
 to MemberName.  Members have a single canonical MemberName.
/description

ejb-relationship-role
 ejb-relationship-role-name Member-has-canonical-MemberName
 /ejb-relationship-role-name
 multiplicity one /multiplicity
 role-source ejb-name MemberEJB /ejb-name /role-source
 cmr-field cmr-field-name memberName /cmr-field-name
 /cmr-field
/ejb-relationship-role

ejb-relationship-role
 ejb-relationship-role-name MemberName-is-canonical-for-Member
 /ejb-relationship-role-name
 multiplicity one /multiplicity
 role-source ejb-name MemberNameEJB /ejb-name /role-source
/ejb-relationship-role
   /ejb-relation

 Just a quick side-note, which I think was brought up before:  the EJB2.0
 spec (pd2) seems to indicate that the cmr-fields should _not_ also be
 defined as cmp-fields in the entity descriptor.  Orion 1.3.8 seems to
 require this.  In any case...

 The table which is created for Member has the memberName field which is
 of course a string (the MemberName's primary key).  Good.  Now I want a
 finder method on MemberHome which is

 public Member findByName(String name);

 I can imagine two ways of going about this.  The simple one would be to
 pretend that Member's memberName is a cmp-field.  The query would be:

query
 query-method
  method-name ejbFindByName /method-name
  method-params
   method-param java.lang.String /method-param
  /method-params
 /query-method
 ejb-ql FROM MemberEJB memb WHERE memb.memberName = ?1 /ejb-ql
/query

 While this works for actual cmp-fields, this does not seem to work for
 cmr-fields.  Not surprising, since the spec doesn't mention this as an
 option (although it doesn't eliminate it, either).

 The "proper" way to write the query, if I'm reading the spec right, is:

query
 query-method
  method-name ejbFindByName /method-name
  method-params
   method-param java.lang.String /method-param
  /method-params
 /query-method
 ejb-ql FROM MemberEJB memb, n IN memb.memberName WHERE n.name = ?1
 /ejb-ql
/query

 But I'm not wholly certain, because all the relational EJB QL examples
 in the spec are for one-to-many relationships, not one-to-one.  In any
 case, when I try this, I get the same results that I do for the first
 query, which is to say wholly incorrect results :-)  The failure mode is
 bad, too; rather than failing to find the Member, it seems to just
 return a random existing Member.

 So am I just pushing the edge of Orion's implementation of the EJB2.0
 spec, or am I defining my queries wrong?  If this is heading into
 unimplemented space, should I log bugs in Bugzilla or just assume that
 the authors are busily working on this very problem and don't need yet
 another monkey on their backs?  :-)

 Is anyone else working with EJB2.0 beans?

 Thanks,
 Jeff Schnitzer
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]





EJB QL and container managed relationships

2000-09-30 Thread Jeff Schnitzer

Hello folks.  Once again I have some questions, this time about EJB QL.
 
The quick version is:  How sophisticated is the current Orion support
for EJB QL?  I want to define a finder query on a field which is the
mapping field of a CMR relationship, but it doesn't seem to work.
 
Here's the long version:
 
I'm using EJB 2.0 CMR fields to map a relationship between two entity
beans, called Member and MemberName.  The primary key for the MemberName
is (not surprisingly) a string, and every Member has a MemberName as
defined by the following relation:
 
  ejb-relation
   ejb-relation-name Member-canonical-MemberName /ejb-relation-name
   description
This is a unidirectional one-to-one mapping from Member
to MemberName.  Members have a single canonical MemberName.
   /description
 
   ejb-relationship-role
ejb-relationship-role-name Member-has-canonical-MemberName
/ejb-relationship-role-name
multiplicity one /multiplicity
role-source ejb-name MemberEJB /ejb-name /role-source
cmr-field cmr-field-name memberName /cmr-field-name
/cmr-field
   /ejb-relationship-role
 
   ejb-relationship-role
ejb-relationship-role-name MemberName-is-canonical-for-Member
/ejb-relationship-role-name
multiplicity one /multiplicity
role-source ejb-name MemberNameEJB /ejb-name /role-source
   /ejb-relationship-role
  /ejb-relation

Just a quick side-note, which I think was brought up before:  the EJB2.0
spec (pd2) seems to indicate that the cmr-fields should _not_ also be
defined as cmp-fields in the entity descriptor.  Orion 1.3.8 seems to
require this.  In any case...
 
The table which is created for Member has the memberName field which is
of course a string (the MemberName's primary key).  Good.  Now I want a
finder method on MemberHome which is
 
public Member findByName(String name);
 
I can imagine two ways of going about this.  The simple one would be to
pretend that Member's memberName is a cmp-field.  The query would be:
 
   query
query-method
 method-name ejbFindByName /method-name
 method-params
  method-param java.lang.String /method-param
 /method-params
/query-method
ejb-ql FROM MemberEJB memb WHERE memb.memberName = ?1 /ejb-ql
   /query

While this works for actual cmp-fields, this does not seem to work for
cmr-fields.  Not surprising, since the spec doesn't mention this as an
option (although it doesn't eliminate it, either).
 
The "proper" way to write the query, if I'm reading the spec right, is:
 
   query
query-method
 method-name ejbFindByName /method-name
 method-params
  method-param java.lang.String /method-param
 /method-params
/query-method
ejb-ql FROM MemberEJB memb, n IN memb.memberName WHERE n.name = ?1
/ejb-ql
   /query

But I'm not wholly certain, because all the relational EJB QL examples
in the spec are for one-to-many relationships, not one-to-one.  In any
case, when I try this, I get the same results that I do for the first
query, which is to say wholly incorrect results :-)  The failure mode is
bad, too; rather than failing to find the Member, it seems to just
return a random existing Member.
 
So am I just pushing the edge of Orion's implementation of the EJB2.0
spec, or am I defining my queries wrong?  If this is heading into
unimplemented space, should I log bugs in Bugzilla or just assume that
the authors are busily working on this very problem and don't need yet
another monkey on their backs?  :-)
 
Is anyone else working with EJB2.0 beans?
 
Thanks,
Jeff Schnitzer
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 




EJB QL support

2000-09-28 Thread John D'Ausilio

Is there any in the current (1.3.8) server?

john d