Re: [JBoss-user] CMP 2.0 Deployment Problem

2003-06-24 Thread Dain Sundstrom
This particular error message comes from 
JDBCRelationshipRoleMetaData.java, which loads the data inside of the 
ejb-relationship-role.  Check your jbosscmp-jdbc.xml file for a 
relationship with a field-name element containing idLine.  My guess 
is you have the key declaration backwards (try swapping the keys, 
between the two sides).

-dain

/*
 * Dain Sundstrom
 * Partner
 * Core Developers Network
 */
On Tuesday, June 24, 2003, at 09:30 AM, Klaus Richarz wrote:

Hello,

I have about 15 CMP entity beans. Some of them are connected by 
relation tables (many to many). I have checked all DD, and they seem 
to be correct (mostly checked jbosscmp-jdbc.xml), but I get the 
following error:

ERROR [org.jboss.ejb.EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: CMP field for key not found: 
field name=idLine

This CMP field is listed in the ejb-jar.xml and in the 
jbosscmp-jdbc.xml file.
Btw. is there any possibility to get behind this error msg ? Maybe 
which bean is affected ???

Any help would be appreciated,

Klaus Richarz

---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting 
Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Core Developers Network Announces Public Launch

2003-06-05 Thread Dain Sundstrom
Core Developers Network(TM) Announces Public Launch

We are pleased to announce the foundation of Core Developers Network, a 
new services company supporting enterprise open source Java software.  
Core Developers Network is a partnership of peers with the guiding 
principles of integrity, openness, and fairness.  Its charter is to 
provide a commercial infrastructure to enable open source contributors 
to deliver their professional expertise to the marketplace, independent 
of their contributions to open source projects.

Many of our partners are core developers with cvs commit privileges on 
the JBoss project, and this enables us to offer a wide range of 
services geared towards the JBoss server, including professional 
documentation, training and expert support.

The focus of Core Developers Network, however, is wider than just 
JBoss, and we have partners with cvs commit privileges on other 
projects including Jetty, Apache Jakarta, and XDoclet.  Direct support 
is available today for these projects, as well as 3rd party support for 
several other Core Technologies (see www.coredevelopers.net for a full 
listing).

We are committed to having the same level of involvement in our current 
projects that we have had in the past.  This means that we will 
continue to work on the JBoss project itself.  In addition, we will 
continue to support the JBoss project via the jboss-development and 
jboss-users mailing lists maintained by SourceForge.net, as well as any 
other open public forum.  Unfortunately, the forums on jboss.org are a 
commercial venue for the JBoss Group LLC, and therefore we will not be 
participating in them.

A few of our partners have offered support through the JBoss Group LLC 
in the past, but for various reasons have concluded that their 
professional aspirations would be better served outside of the JBoss 
Group LLC.  In order to ensure that customers previously supported by 
our partners continue to receive the same level of high quality 
support, Core Developers Network is offering these customers a limited 
amount of free support during this transition period.

We want to emphasize that our partners will continue to provide the 
same responsive, high-quality technical support as we have always done. 
 The founding of Core Developers Network simply signals the natural 
emergence of competition in the marketplace.  We hope that broadening
the range of service options for open source projects will raise the 
level of support available and lead to even greater adoption of these 
Core Technologies.

Please look for us at JavaOne booth 1705!

Core Developers Network
www.coredevelopers.net
Jan Bartel
Jeremy Boynes
Remigio Chirino
Jules Gosnell
David Jencks
James Stracham
Dain Sundstrom
Greg Wilkins


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Core Developers Network Announces Public Launch

2003-06-05 Thread Dain Sundstrom
Core Developers Network(TM) Announces Public Launch

We are pleased to announce the foundation of Core Developers Network, a 
new services company supporting enterprise open source Java software.  
Core Developers Network is a partnership of peers with the guiding 
principles of integrity, openness, and fairness.  Its charter is to 
provide a commercial infrastructure to enable open source contributors 
to deliver their professional expertise to the marketplace, independent 
of their contributions to open source projects.

Many of our partners are core developers with cvs commit privileges on 
the JBoss project, and this enables us to offer a wide range of 
services geared towards the JBoss server, including professional 
documentation, training and expert support.

The focus of Core Developers Network, however, is wider than just 
JBoss, and we have partners with cvs commit privileges on other 
projects including Jetty, Apache Jakarta, and XDoclet.  Direct support 
is available today for these projects, as well as 3rd party support for 
several other Core Technologies (see www.coredevelopers.net for a full 
listing).

We are committed to having the same level of involvement in our current 
projects that we have had in the past.  This means that we will 
continue to work on the JBoss project itself.  In addition, we will 
continue to support the JBoss project via the jboss-development and 
jboss-users mailing lists maintained by SourceForge.net, as well as any 
other open public forum.  Unfortunately, the forums on jboss.org are a 
commercial venue for the JBoss Group LLC, and therefore we will not be 
participating in them.

A few of our partners have offered support through the JBoss Group LLC 
in the past, but for various reasons have concluded that their 
professional aspirations would be better served outside of the JBoss 
Group LLC.  In order to ensure that customers previously supported by 
our partners continue to receive the same level of high quality 
support, Core Developers Network is offering these customers a limited 
amount of free support during this transition period.

We want to emphasize that our partners will continue to provide the 
same responsive, high-quality technical support as we have always done. 
 The founding of Core Developers Network simply signals the natural 
emergence of competition in the marketplace.  We hope that broadening
the range of service options for open source projects will raise the 
level of support available and lead to even greater adoption of these 
Core Technologies.

Please look for us at JavaOne booth 1705!

Core Developers Network
www.coredevelopers.net
Jan Bartel
Jeremy Boynes
Remigio Chirino
Jules Gosnell
David Jencks
James Stracham
Dain Sundstrom
Greg Wilkins


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] massive performance decrease

2003-04-04 Thread Dain Sundstrom
HEAD as of yesterday should be slower as I turned on object copying in 
getters and setters.  When a getter is called we return a copy of the 
internal value and when you set a value it makes a copy of the passed 
in value.  If you are not using immutable types this can slow you down. 
 Right now I have configuration for all datatypes in the JDK, and I 
will be adding metadata support so you can configure your types.

-dain

On Friday, April 4, 2003, at 02:29 PM, Langelage, Frank wrote:

Today I executed my little performance test with current cvs-versions 
of 3.2 and HEAD.
The execution time for this testcase dropped to ~ 60 min with HEAD: a 
significant improvement.
But the execution time with 3.2RC5 is even better: ~ 50 min.

So I will take your suggestion and use 3.2 for now.

regards - frank

Dain Sundstrom wrote:

Ok now it should be faster then is has ever been.  I have another 
idea on how to make it even better, but it should be super fast right 
now.

-dain

On Thursday, March 27, 2003, at 02:08 PM, Dain Sundstrom wrote:

JBoss HEAD is a work in progress.  The performance will get worse 
and better; there will be bugs.  You can't make an omelet without 
breaking a few eggs.  I suggest you use 3.2.

-dain

On Thursday, March 27, 2003, at 09:12 AM, Langelage, Frank wrote:

After the cvs update of JBoss-head yesterday, I encountered a 
massive performance decrease for one of my testcases.
The update included the changes from Dain of the last days.

Three EJB's are involved by this task:
1. Item, CMP EntityBean
   PK itemId
2. BoM, CMP EntityBean,
   PK primItemId+posNr
3. LoadData, StatelessSessionBean
Item has a unidirectional relation to BoM 
(Item.itemId-BoM.primItemId).
BoM has a relation back to Item (BoM.subItemId - Item.subItemId).
LoadData opens a File, reads line by line and creates the beans for 
the data, all within one big transaction.
First loadItemData is executed, then loadBoMData.

The performance of loadBomData has dropped from about 1h 20min to 
6h 20min now (~36600 rows in file).
When loadBoMData starts, the CPU usage of my AppServer increases to 
85 - 90%. The CPU usage of database server drops to 7-9%.
(to compare: while loadItemData is running, AppServer 25%, DBServer 
75%).

Other data loads which also create beans with CMR work well or even 
slightly better than before.

Any comments ?

Regards - Frank



---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for 
just $79/mo with 500 GB of bandwidth! No other company gives more 
support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for 
just $79/mo with 500 GB of bandwidth! No other company gives more 
support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR Error under load

2003-04-03 Thread Dain Sundstrom
I think the message is remove the read-only tags and you will not get 
the errors.

-dain

On Thursday, April 3, 2003, at 03:03 AM, Andrew May wrote:

My test case fails on 3.0.3 so it's not just a problem with 3.2.0. So 
for us that means we can't go live with either :( - unless we can find 
a suitable workaround.

Andrew

Stephen Coy wrote:
At the moment, we have a regression failure from 3.0.x to 3.2.0,  
because it works fine there. I say it works because it doesn't  
fail, which is not the same thing as behaving correctly.
So, we need to decide what the appropriate behaviour will be for 3.2  
and make it work properly.
I will get the testcase as it stands cleaned up and checked in 
tonight.
At the moment, if people try to migrate from 3.0.x to 3.2, their  
applications will break if using this construct.
Steve Coy
On Thursday, April 3, 2003, at 03:58  AM, Dain Sundstrom wrote:
I doubt that a CMR will work with the read-only flag.  The problem 
is  a read-only specifically does not associate the transaction with 
the  invocation and does not enlist the entity in the tx 
synchronization.   A CMR collection is dependent on a transaction 
and having tx  synchronization.  I bet Stephen can hack the code to 
get it to work,  but should we fix it or just disallow it for CMRs?

I personally have never liked the read-only flag because it means so 
 much in out system.  It means no-lock, no-transaction,  
no-synchronization, and so on.  What if I want the read in a  
transaction because I want consistent reads across several entities, 
 but I want to avoid a sync lock?  Because all of these option are 
tied  up into a single flag we don't get flexibility.

In JB4 CMP the flag has little value because we will have 
notification  from fields when something changes.  In this case 
read-only would mean  no-lock and no-transaction, but is that what 
the average user thinks  read-only would mean.  Even worse it ends 
up being a fairly small  optimization.  Since a local transaction 
has almost no overhead, and  for JB4 we plan on making 
multi-instance the default you get 0 benefit  from the flag, but a 
ton of headache from the code.  I think for 4.0  we should not allow 
read-only for CMP.  For BMP is makes since, but I  think we should 
make it mean just no-store or change it to no-store.   Additionally 
we I think we should add a no-lock flag for  single-instance 
invocations.  For no-transaction we have the standard  EJB flags.

-dain



On Wednesday, April 2, 2003, at 10:18 AM, Stephen Coy wrote:

Ah ha!

It needs those read-only tags in jboss.xml in order to fail.

Previously, I had explicitly specified that getChildren was  
read-only. It needs to be get*.

My test is failing now.

Steve Coy





---
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for 
just $79/mo with 500 GB of bandwidth! No other company gives more 
support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR Error under load

2003-04-03 Thread Dain Sundstrom
What is the name of the test case and are you working on a solution?

-dain

On Thursday, April 3, 2003, at 04:22 AM, Stephen Coy wrote:

I'll add the testcase to Branch_3_0 as well.

We've never experienced this problem, but have only operated under 
3.0.2, 3.0.4 and 3.0.6.

Our application (over)uses lots of CMR and we use those read-only tags 
everywhere too.

Steve Coy

On Thursday, April 3, 2003, at 07:03  PM, Andrew May wrote:

My test case fails on 3.0.3 so it's not just a problem with 3.2.0. So 
for us that means we can't go live with either :( - unless we can 
find a suitable workaround.

Andrew

Stephen Coy wrote:
At the moment, we have a regression failure from 3.0.x to 3.2.0,  
because it works fine there. I say it works because it doesn't  
fail, which is not the same thing as behaving correctly.
So, we need to decide what the appropriate behaviour will be for 3.2 
 and make it work properly.
I will get the testcase as it stands cleaned up and checked in 
tonight.
At the moment, if people try to migrate from 3.0.x to 3.2, their  
applications will break if using this construct.
Steve Coy
On Thursday, April 3, 2003, at 03:58  AM, Dain Sundstrom wrote:
I doubt that a CMR will work with the read-only flag.  The problem 
is  a read-only specifically does not associate the transaction 
with the  invocation and does not enlist the entity in the tx 
synchronization.   A CMR collection is dependent on a transaction 
and having tx  synchronization.  I bet Stephen can hack the code to 
get it to work,  but should we fix it or just disallow it for CMRs?

I personally have never liked the read-only flag because it means 
so  much in out system.  It means no-lock, no-transaction,  
no-synchronization, and so on.  What if I want the read in a  
transaction because I want consistent reads across several 
entities,  but I want to avoid a sync lock?  Because all of these 
option are tied  up into a single flag we don't get flexibility.

In JB4 CMP the flag has little value because we will have 
notification  from fields when something changes.  In this case 
read-only would mean  no-lock and no-transaction, but is that what 
the average user thinks  read-only would mean.  Even worse it ends 
up being a fairly small  optimization.  Since a local transaction 
has almost no overhead, and  for JB4 we plan on making 
multi-instance the default you get 0 benefit  from the flag, but a 
ton of headache from the code.  I think for 4.0  we should not 
allow read-only for CMP.  For BMP is makes since, but I  think we 
should make it mean just no-store or change it to no-store.   
Additionally we I think we should add a no-lock flag for  
single-instance invocations.  For no-transaction we have the 
standard  EJB flags.

-dain



On Wednesday, April 2, 2003, at 10:18 AM, Stephen Coy wrote:

Ah ha!

It needs those read-only tags in jboss.xml in order to fail.

Previously, I had explicitly specified that getChildren was  
read-only. It needs to be get*.

My test is failing now.

Steve Coy





---
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for 
just $79/mo with 500 GB of bandwidth! No other company gives more 
support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for 
just $79/mo with 500 GB of bandwidth! No other company gives more 
support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2RC4 and Hibernate2

2003-04-03 Thread Dain Sundstrom
There is also a problem is they are trying to use 
java.rmi.MarshalledObject to store serialized objects, because 
java.rmi.MarshalledObject does not respect classloaders.

-dain

On Thursday, April 3, 2003, at 12:52 PM, Scott M Stark wrote:

It look like a problem with hibernate using Class.forName rather than
the Thread.currentThread().getContextClassLoader(). Class.forName
forces the class in question to be visible vis that class loader of the
calling class or one of its parents. This is too restrictive for a 
framework
in an arbitrary server environment. If you replace the Class.forName
call with the thread context class loader and it still does not work 
then
come back.

2003-04-01 22:33:41,439 ERROR [org.jboss.ejb.plugins.LogInterceptor]
Unexpected Error:
java.lang.NoClassDefFoundError: org/apache/bcel/generic/DCONST
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at net.sf.cglib.CodeGenerator.class$(CodeGenerator.java:63)
at net.sf.cglib.CodeGenerator.init(CodeGenerator.java:105)
at net.sf.cglib.KeyFactoryGenerator.init(KeyFactoryGenerator.java:93)
at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)

Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: Anders Engström [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 9:38 AM
Subject: [JBoss-user] JBoss 3.2RC4 and Hibernate2


---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2RC4 and Hibernate2

2003-04-03 Thread Dain Sundstrom
On Thursday, April 3, 2003, at 02:42 PM, Anders Engström wrote:

On Thu, Apr 03, 2003 at 10:52:38AM -0800, Scott M Stark wrote:

In the meantime - what use does bcel.jar serve in jboss, and is it safe
to remove it from the server's classpath (or replace it with cglib from
hibernate) in a J2EE server setup??
CMP 2.0 uses it to generate sub classes of the abstract implementation. 
 I would like it if all of our code that used the JDK dynamic proxy 
generation to use BCEL instead because the BCEL implementation 
generates better code.  For example, the class name is more 
recognizable instead of Proxy98 junk.

I'm not sure if anyone else uses it.  What does JMX use to generate 
classes?

-dain

---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR Error under load

2003-04-02 Thread Dain Sundstrom
I doubt that a CMR will work with the read-only flag.  The problem is a  
read-only specifically does not associate the transaction with the  
invocation and does not enlist the entity in the tx synchronization.  A  
CMR collection is dependent on a transaction and having tx  
synchronization.  I bet Stephen can hack the code to get it to work,  
but should we fix it or just disallow it for CMRs?

I personally have never liked the read-only flag because it means so  
much in out system.  It means no-lock, no-transaction,  
no-synchronization, and so on.  What if I want the read in a  
transaction because I want consistent reads across several entities,  
but I want to avoid a sync lock?  Because all of these option are tied  
up into a single flag we don't get flexibility.

In JB4 CMP the flag has little value because we will have notification  
from fields when something changes.  In this case read-only would mean  
no-lock and no-transaction, but is that what the average user thinks  
read-only would mean.  Even worse it ends up being a fairly small  
optimization.  Since a local transaction has almost no overhead, and  
for JB4 we plan on making multi-instance the default you get 0 benefit  
from the flag, but a ton of headache from the code.  I think for 4.0 we  
should not allow read-only for CMP.  For BMP is makes since, but I  
think we should make it mean just no-store or change it to no-store.   
Additionally we I think we should add a no-lock flag for  
single-instance invocations.  For no-transaction we have the standard  
EJB flags.

-dain



On Wednesday, April 2, 2003, at 10:18 AM, Stephen Coy wrote:

Ah ha!

It needs those read-only tags in jboss.xml in order to fail.

Previously, I had explicitly specified that getChildren was  
read-only. It needs to be get*.

My test is failing now.

Steve Coy

On Thursday, April 3, 2003, at 01:30  AM, Andrew May wrote:

I've tried to do a bit of investigation of my own. I'm still trying  
to get my head around the code, but this is what I think is going on.

The exception:

java.lang.IllegalStateException: The iterator of a CMR collection may  
only be used within the transction in which it was created
at  
org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet$1.verifyIteratorIsVa 
lid(RelationSet.java:309)

gets throws when setHandle[0] is null. This reference to a set of ids  
is nullified by JDMCCMRFieldBridge$FieldState.invalidate().

When two threads (A  B) are using the Entity at the same time (which  
is allowed because the getPropertyMap method is read-only) it's  
possible for thread A to nullify setHandle[0] (at the end of it's  
transaction) whilst thread B is in the middle of iterating around the  
relationship. After that any call to the CMR iterator in thread B  
causes the exception - which is why it's sometimes from hasNext() and  
sometimes from next().

Here's a couple of Thead stacks I captured using the test case. The  
first thread is in the middle of iterating, and the second is  
finishing it's transaction:

System Thread [RMI TCP Connection(172)-192.168.5.20] (Suspended)
java.lang.StringBuffer.init(int) line: 114 [local variables  
unavailable]
java.lang.StringBuffer.init() line: 103
com.ingenta.acs.test.ejb.ParentBean$Proxy(com.ingenta.acs.test.ejb.Par 
entBean).getPropertyMap() line: 86
sun.reflect.GeneratedMethodAccessor87.invoke(java.lang.Object,  
java.lang.Object[]) line: not available [local variables unavailable]
sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object,  
java.lang.Object[]) line: 25 [local variables unavailable]
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])  
line: 324
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(org.jboss.in 
vocation.Invocation) line: 1044
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(org.jbos 
s.invocation.Invocation) line: 95
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(org.jbos 
s.invocation.Invocation) line: 295
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invok 
e(org.jboss.invocation.Invocation) line: 186
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(org.jboss.inv 
ocation.Invocation) line: 82
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(org.jboss.invoc 
ation.Invocation) line: 174
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(org.jboss.invocatio 
n.Invocation) line: 89
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(org.jboss.invoc 
ation.Invocation) line: 53
org.jboss.ejb.plugins.TxInterceptorCMT(org.jboss.ejb.plugins.AbstractT 
xInterceptor).invokeNext(org.jboss.invocation.Invocation, boolean)  
line: 84
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(org.jboss.i 
nvocation.Invocation) line: 243
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(org.jboss.invocation.Inv 
ocation) line: 104
org.jboss.ejb.plugins.SecurityInterceptor.invoke(org.jboss.invocation. 
Invocation) line: 117

Re: [JBoss-user] massive performance decrease

2003-04-02 Thread Dain Sundstrom
Ok now it should be faster then is has ever been.  I have another idea 
on how to make it even better, but it should be super fast right now.

-dain

On Thursday, March 27, 2003, at 02:08 PM, Dain Sundstrom wrote:

JBoss HEAD is a work in progress.  The performance will get worse and 
better; there will be bugs.  You can't make an omelet without breaking 
a few eggs.  I suggest you use 3.2.

-dain

On Thursday, March 27, 2003, at 09:12 AM, Langelage, Frank wrote:

After the cvs update of JBoss-head yesterday, I encountered a massive 
performance decrease for one of my testcases.
The update included the changes from Dain of the last days.

Three EJB's are involved by this task:
1. Item, CMP EntityBean
   PK itemId
2. BoM, CMP EntityBean,
   PK primItemId+posNr
3. LoadData, StatelessSessionBean
Item has a unidirectional relation to BoM 
(Item.itemId-BoM.primItemId).
BoM has a relation back to Item (BoM.subItemId - Item.subItemId).
LoadData opens a File, reads line by line and creates the beans for 
the data, all within one big transaction.
First loadItemData is executed, then loadBoMData.

The performance of loadBomData has dropped from about 1h 20min to 6h 
20min now (~36600 rows in file).
When loadBoMData starts, the CPU usage of my AppServer increases to 
85 - 90%. The CPU usage of database server drops to 7-9%.
(to compare: while loadItemData is running, AppServer 25%, DBServer 
75%).

Other data loads which also create beans with CMR work well or even 
slightly better than before.

Any comments ?

Regards - Frank



---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] List ten things you want fixed (was Re: JBoss: Not Ready For Prime Time)

2003-04-01 Thread Dain Sundstrom
Seriously, you guys need to stop falling for the trolls.  No normal 
person continues to fight so strongly for a product they hate.  My 
guess is this guy works for a PR firm hired by Sun or BEA, but it could 
be any player in the J2EE world.

Just shun him and he will go away.

-dain

On Tuesday, April 1, 2003, at 08:34 PM, Weiqi Gao wrote:

On Tue, 2003-04-01 at 18:49, [EMAIL PROTECTED] wrote:
You consider it ugly, I consider it facts.
That makes it ugly facts.

I asked on this list why Axis wasn't working and I got nothing. I went
to the JBoss forums where I found out you had to get the source and
recompile in order to get it working.
Now consider this, the Axis stuff weren't even in JBoss when I started
using JBoss.  And one day, after downloading an interim point release 
of
JBoss, I found the axis.jar in there.  And I said to myself, Somebody
is interested in integrating this stuff into JBoss.  Great!  Maybe I'll
start using it when it is done.

Apparently it is not done.  And it's quite a struggle to get it to
working.  So what, it's progress.  If the thing really solves peoples
problems (rather than satisfy a frivolous useless feature check mark 
for
marketards), it will get used, and the bugs worked out.

I didn't have to do anything like that for Orion, WebSphere, the
defunct Borland offering, or WebLogic.
Well, JBoss is an Open Source project, and those products aren't.  And
JBoss commands a critical mass now.  All of these means that whatever
shortcomings JBoss may have now, if it impacts a lot of people, will be
eliminated in a relatively short period of time.
I find your destructive stance of leaning back and expecting
everything to run out of the box (without compilation) extremely
odd.
I don't find it odd at all.

I used Ant right out of the box, as I did Struts, Tomcat, Apache,
JUnit
I use JBoss out of the box.

It all depends on which portion of the product you are using.

I'm doing this work on my limited spare time. If I had the time to
contribute, I would. As it stands, I don't see JBoss as being a
production ready tool.
List ten concrete things in JBoss that's not working for you, and I'll
see if I can contribute some of my also limited spare time to fix it up
for you.
[Note that I'm not an official JBoss developer.  I'm just a user who
sees a chance to give something back to the community, and potentially
help a frustrated would be JBoss user.]
--
Weiqi Gao
[EMAIL PROTECTED]


---
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: Re[2]: [JBoss-user] CMR Error under load

2003-03-28 Thread Dain Sundstrom
I fixed a similar bug in this stuff for Sacha on March 19th (version 
1.43.2.13).  The problem was registering for transaction 
synchronization on the transaction in the context and not the 
transaction associated with the current thread.  This bug created the 
type of problem you have described, but the fix should bin in 3.2 rc4.

Until someone can create a test case that reproduces the new bug, I 
don't think there is much we can do.

-dain

On Friday, March 28, 2003, at 10:01 AM, Alex Loubyansky wrote:

Hello Andrew,

you are not alone complaining about this. But nobody could produce a
testcase that fail at least eventually.
I am trying to reproduce it but can't for the moment.

I have a Parent and 1000 of related Child entities.
I have 100 concurrent threads finding parent by primary key, getting
children and iterating through relation collection.
I use standard container for both Parent and Child.
In jboss.xml get methods are read-only for both Parent and Child.
Any more info you can provide? Again a testcase would be great. Let it
fail not each time but eventually.
Thank you,
alex
Friday, March 28, 2003, 4:15:40 PM, Andrew May wrote:

AM I've just tried it and RC4 has the same problem. We're using 
normal jbosscmp container.

AM Andrew

AM Simone Milani wrote:

Hi,
I had the same promlem when I was using RC3.  Try to move to 
RC4.  What
container are you using?

Simone




---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] massive performance decrease

2003-03-27 Thread Dain Sundstrom
JBoss HEAD is a work in progress.  The performance will get worse and 
better; there will be bugs.  You can't make an omelet without breaking 
a few eggs.  I suggest you use 3.2.

-dain

On Thursday, March 27, 2003, at 09:12 AM, Langelage, Frank wrote:

After the cvs update of JBoss-head yesterday, I encountered a massive 
performance decrease for one of my testcases.
The update included the changes from Dain of the last days.

Three EJB's are involved by this task:
1. Item, CMP EntityBean
   PK itemId
2. BoM, CMP EntityBean,
   PK primItemId+posNr
3. LoadData, StatelessSessionBean
Item has a unidirectional relation to BoM 
(Item.itemId-BoM.primItemId).
BoM has a relation back to Item (BoM.subItemId - Item.subItemId).
LoadData opens a File, reads line by line and creates the beans for 
the data, all within one big transaction.
First loadItemData is executed, then loadBoMData.

The performance of loadBomData has dropped from about 1h 20min to 6h 
20min now (~36600 rows in file).
When loadBoMData starts, the CPU usage of my AppServer increases to 85 
- 90%. The CPU usage of database server drops to 7-9%.
(to compare: while loadItemData is running, AppServer 25%, DBServer 
75%).

Other data loads which also create beans with CMR work well or even 
slightly better than before.

Any comments ?

Regards - Frank



---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: Re[2]: [JBoss-user] effective and secure logging

2003-03-24 Thread Dain Sundstrom
On Monday, March 24, 2003, at 09:49 AM, costin wrote:

I was thinking of wrapping the logging procedure into an transaction
but I don`t really know how the flushing of the files and all that is
handled by the virtual machine(some form of caching can prevent any
move I make).
The only way to get close to a guaranteed flush is to use NIO.  If you 
want it to be efficient and reliable you will have to use NIO.  I 
suggest you take a look at java.nio.MappedByteBuffer.

-dain



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


Re: Re[4]: [JBoss-user] effective and secure logging

2003-03-24 Thread Dain Sundstrom
Sorry if I wasn't clear. I suggest you write a log4j appender with NIO 
that has the features you need.  Your application would continue to use 
the enterprise log4j API but  the underling implementation would have 
the features you need.  I suggest you buy the excellent log4j 
documentation.  Hey he may already have what you need implemented.  You 
could also contract with Ceki to have him write it for you.

-dain

On Monday, March 24, 2003, at 11:00 AM, costin wrote:

Hi!

Thanks. I was actually looking through an oreilly book about NIO. The
only problem is how will this break the whole enterprise concept.
Don`t get me wrong, this is okay - thanks; but isn`t there something
in the enterprise arena. Having logs in an enterprise manner is no
new idea.
My concern is that this thing will have to evolve and it will simply
eat too much time (logging is a feature of the application but not the
only one) and I simply don`t have the man power to do it corectly.
Anyway, thanks again for the tip.

DS On Monday, March 24, 2003, at 09:49 AM, costin wrote:

I was thinking of wrapping the logging procedure into an transaction
but I don`t really know how the flushing of the files and all that is
handled by the virtual machine(some form of caching can prevent any
move I make).
DS The only way to get close to a guaranteed flush is to use NIO.  If 
you
DS want it to be efficient and reliable you will have to use NIO.  I
DS suggest you take a look at java.nio.MappedByteBuffer.

DS -dain



DS ---
DS This sf.net email is sponsored by:ThinkGeek
DS Welcome to geek heaven.
DS http://thinkgeek.com/sf
DS ___
DS JBoss-user mailing list
DS [EMAIL PROTECTED]
DS https://lists.sourceforge.net/lists/listinfo/jboss-user
--
Thanks,
 costinmailto:[EMAIL PROTECTED]


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


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


Re: [JBoss-user] new datasource

2003-03-23 Thread Dain Sundstrom
On Sunday, March 23, 2003, at 04:09 PM, David Ward wrote:

Put it in the deploy subdir, and it will be hot-deployed.  Make sure 
you have the appropriate jdbc driver in the lib subdir first.

eg:
$JBOSS_HOME/server/default/lib/ojdbc14.jar
$JBOSS_HOME/server/default/deploy/oracle-ds.xml
I think it is safer to put the driver classes in lib as you can have 
big problems it they redeploy.

-dain



---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] new datasource

2003-03-23 Thread Dain Sundstrom
I'm dumb.  I didn't read that very carefully.

-dain

On Sunday, March 23, 2003, at 07:33 PM, David Ward wrote:

Isn't that what I said?  Driver jar in lib and datasource xml in 
deploy.
By it I meant the datasource xml file.

Sorry if I wasn't clear before.
David
Dain Sundstrom escribió::
On Sunday, March 23, 2003, at 04:09 PM, David Ward wrote:
Put it in the deploy subdir, and it will be hot-deployed.  Make sure 
you have the appropriate jdbc driver in the lib subdir first.

eg:
$JBOSS_HOME/server/default/lib/ojdbc14.jar
$JBOSS_HOME/server/default/deploy/oracle-ds.xml
I think it is safer to put the driver classes in lib as you can have 
big problems it they redeploy.
-dain


---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] jboss on linux (performance)

2003-03-19 Thread Dain Sundstrom
Loads of people do it quite successfully, so yes.

-dain

On Wednesday, March 19, 2003, at 02:54 PM, David Luis Fernandes de 
Araujo wrote:

So, do you think is safe to run jboss on linux in a production 
enviorment ?

On Wed, 19 Mar 2003 12:27:17 -0500
John M Flinchbaugh [EMAIL PROTECTED] wrote:
On Wed, Mar 19, 2003 at 06:03:20PM +, David Luis Fernandes de 
Araujo wrote:
i'm running jboss on a linux machine (redhat 7.3) and each one of the
threads that jboss throws occupies 60 MB of memory.
Is this normal ?
What can i do minimize the memory usage ?
i believe this is all shared memory.  each thread reports the block of
memory, but it's all the same block.  in reality, it's probably only
using around 60M total.
--
}John Flinchbaugh{__
| [EMAIL PROTECTED] http://www.hjsoft.com/~glynis/ |
~~Powered by Linux: Reboots are for hardware upgrades only~~


--
David Araujo   [EMAIL PROTECTED]
Novis Telecom, S.A.http://www.novis.pt
ISP - Trusted Services Estrada da Outurela, 118  - A
Tel: +351 21 0104169   2795-606 Carnaxide - Portugal
---
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Am I in a transaction?

2003-03-19 Thread Dain Sundstrom
TransactionManager tm = (TransactionManager) 
iniCtx.lookup(java:/TransactionManager);
if(tm.getTransaction() != null) {
	// got a transaction
}

-dain
On Wednesday, March 19, 2003, at 05:09 PM, Brian Wallis wrote:
I have some utility classes that are used from beans with container 
managed
transactions. How can I check (ensure) when I am in one of the utility
routines that there is a transaction current?

I cannot get a UserTransaction object via the context since it is a 
bean
managed transaction so I cannot call getStatus().

It's not critical that I check, but I would like to be able to to make 
sure
that the utility routine has not been called outside of a transaction
boundary.

brian wallis...



---
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] read-ahead question

2003-03-17 Thread Dain Sundstrom
You need to use a transaction.  Preloaded data is only available in a 
single transaction.

-dain

On Monday, March 17, 2003, at 10:28 AM, Rafal Kedziorski wrote:

hi,

I have following entity bean definition in jbosscmp-jdbc.xml:

entity
  ejb-nameUsersBean/ejb-name
  read-ahead
strategyon-find/strategy
page-size4/page-size
eager-load-group*/eager-load-group
  /read-ahead
  list-cache-max1000/list-cache-max
  table-nameusers/table-name
  ...
/entity
Now I call:

UsersLocalHome usersHome = (UsersLocalHome) 
serviceLocator.getLocalHome(JNDINamesAccess.USERS_EJB);
Collection usersCollection = usersHome.findAll();

In my tabel are 9 entries. I defined (above) page-size=4 but in my 
PostgreSQL debug file I see n+1 queries instead of 3.

SELECT t0_o.users_id, t0_o.mandant_id, t0_o.language_id, 
t0_o.login_name, t0_o.password, t0_o.first_name, t0_o.last_name, 
t0_o.sex, t0_o.creation_date, t0_o.last_login_date, t0_o.status FROM 
users t0_o

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=3) OR (users_id=1047478054621394) OR 
(users_id=1047565695856221) OR (users_id=1047657838929148)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047478054621394) OR 
(users_id=1047565695856221) OR (users_id=1047657838929148) OR 
(users_id=1047657841302566)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047565695856221) OR 
(users_id=1047657838929148) OR (users_id=1047657841302566) OR 
(users_id=1047657843382249)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047657838929148) OR 
(users_id=1047657841302566) OR (users_id=1047657843382249) OR 
(users_id=1047657844739175)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047657841302566) OR 
(users_id=1047657843382249) OR (users_id=1047657844739175) OR 
(users_id=1)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047657843382249) OR 
(users_id=1047657844739175) OR (users_id=1) OR (users_id=2)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1047657844739175) OR (users_id=1) OR 
(users_id=2)

SELECT users_id,mandant_id, language_id, login_name, password, 
first_name, last_name, sex, creation_date, last_login_date, status 
FROM users WHERE (users_id=1) OR (users_id=2)

SELECT mandant_id, language_id, login_name, password, first_name, 
last_name, sex, creation_date, last_login_date, status FROM users 
WHERE (users_id=2)

Why? In jboss.xml are:

container-configurations
  container-configuration
container-nameStandard CMP 2.x EntityBean/container-name
commit-optionA/commit-option
  /container-configuration
/container-configurations
and at least: which container configuration will be taken by default 
for entity and session beans?

Regards,
Rafal


---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Re: Hibernate or ejb

2003-03-14 Thread Dain Sundstrom
On Friday, March 14, 2003, at 02:30 PM, Schnitzer, Jeff wrote:

Sounds like Hibernate needs some integration with J2EE transactions.
Yes, and I gather that a component is in the works.  But Hibernate 
works
well in an EJB environment anyways.

The great advantage over Hibernate over CMP, IMHO, is that the data
objects are simple JavaBeans which can remain useful outside of the 
life
of a transaction.  In CMP, data has no life outside of a transaction so
it's impossible to cache data across transactions without creating a
second layer of data objects.  With Hibernate you can populate a data
object and simply return it out of the EJB layer.
It is not really an advantage of Hibernate it is symptom of poor CMP 
implementation.  We plan on doing value objects under the cover of the 
dynamic proxy.  I think only issue with Hibernate is it doesn't really 
consider interaction with other services like clustering, global 
transaction and remoting to name a few.  We will be integrating a lot 
of the ideas of Hibernate into our AOP persistence front end.  The 
middle layer of the persistence engine, what I would call the most 
important layer, I think will be way ahead of hibernate. Maybe we 
should consider adding a hibernate as a supported front end framework 
(like CMP, AOP and JDO).

-dain

/**
 * @name Dain Sundstrom
 * @titleAuthor CMP on JBoss
 * @company  The JBoss Group, LLC.
 */


---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMP Entity Bean Insert/Commit after ejbPostCreate()

2003-03-13 Thread Dain Sundstrom
3.2 supports not null foreign keys, but you will have to ask Alexey how 
to set it up.

-dain

On Thursday, March 13, 2003, at 10:42 AM, Jonathan.O'[EMAIL PROTECTED] 
wrote:

Bernhard,
No, JBoss 3.x does the insert after ejbCreate. 4.0 is reputed to have 
(will have) support for INSERT after ejbPostCreate.

Ciao,
Jonathan O'Connor
Development Manager
XCOM Dublin
Phone: +353 1 872 3305
Mobile: +353 86 824 0736

image.tiff




Hi,

does JBoss 3.2 issue INSERT/COMMIT after ejbPostCreate() or is it 
possible
to configure it this way (you can do this e.g. in WebLogic) ?

As far as I know, all JBoss 3.0.x versions already do an INSERT between
ejbCreate() and ejbPostCreate(). Has this changed in any newer 
version()?
This is a problem for me, since this means FK columns can't be 
declared as
NOT NULL since as y'all know CMR fields can only be set in 
ejbPostCreate().
I don't want to use Deferred Constraints feature some databases offer.

Cheers,
Bernhard
Bernhard Meyer-Willner, MSc
Insurance - Financial Services
_
LogicaCMG
Logica GmbH
Osterbekstrasse 90b - Alster City
22083 Hamburg
Germany
T:  +49 (0) 40 27071-405 (direct)
M: +49 (0) 177 425-9036
E:  mailto:[EMAIL PROTECTED]
www.logicacmg.com
This e-mail and any attachment is for authorised use by the intended 
recipient(s) only.  It may contain proprietary material, confidential 
information and/or be subject to legal privilege.  It should not be 
copied, disclosed to, retained or used by, any other party.  If you 
are not an intended recipient then please promptly delete this e-mail 
and any attachment and all copies and inform the sender.  Thank you.

---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Relationship between JTA and JDBC transactions

2003-03-13 Thread Dain Sundstrom
I suggest you put this code in a servlet filter so the transaction 
aspect won't pollute your servlet code (and you get some reuse, but 
that is not the important part).

-dain

On Thursday, March 13, 2003, at 12:43 PM, Craig Berry wrote:

Thanks very much.  This is a one-database application, so multiple-db
issues won't be a problem.
-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 8:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Relationship between JTA and JDBC 
transactions

Use a UserTransaction in the servlet to  control the tx.  Make sure the
tx attributes on all the beans are Requires or Supported.  Make sure 
you
set up datasources with tx support, either local or xa.  If you get
connections to more than one database (not table, database) in one
transaction, read a book that explains two phase commit thoroughly and
be sure you understand it.

david jencks

On 2003.03.13 01:48 Craig Berry wrote:
This is in part a general J2EE question, but I suspect some of the
behavior may be implementation specific, so if it has a JBoss
peculiarity, please let me know.
I would like to establish a JTA transaction in a servlet, under which
the servlet will look up and interact with session beans, which will
in turn do the same with entity beans.  The entity beans, and possibly

the session beans under special circumstances, will be obtaining JDBC
connections from the pool and using them to move data to and from the
DB.  The servlet will make many session bean calls, each of which may
make several entity bean calls, but of course I want the whole thing,
including all the DB changes, to operate as a transaction -- that is,
nothing really changes at the DB level until the servlet calls
usertxn.commit().
The problem is that all the doc I can find dances around the
interaction of jdbc and jta transactions without actually answering
the question of whether this is how things are supposed to work, and
if so, what config and coding pattern(s) to follow to achieve this
goal.  It seems like a fairly standard thing to want to do, so I can't

imagine the answer isn't out there somewhere -- but so far, I've had
no luck finding it.
If it matters, all the beans use container managed transactions set to

join any txn in process, and the entity beans use bean-managed
persistence.
So, can anyone either provide this info directly, or point me to some
good clear documentation on the details of how to do this under JBoss?

Thanks in advance!




---
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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-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
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMP Entity Bean commit-option problem

2003-03-11 Thread Dain Sundstrom
Have you tried 3.0.6?

-dain

On Tuesday, March 11, 2003, at 08:32 AM, Mike Lecza wrote:

Can someone confirm that this works for them so at least I know it may  
be something that I am doing wrong?

?

Best Regards

?

?

-Original Message-
From: [EMAIL PROTECTED]  
[mailto:[EMAIL PROTECTED] On Behalf OfMike Lecza
Sent: Monday, March 10, 2003 6:53 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] CMP Entity Bean commit-option problem

?

Thought Id refresh this thread to too if anyone has any ideas

?

?

?

-Original Message-
From: [EMAIL PROTECTED]  
[mailto:[EMAIL PROTECTED] On Behalf OfMike Lecza
Sent: Thursday, March 06, 2003 2:39 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] CMP Entity Bean commit-option problem

?

JBoss 3.0.4/ Postgres 7.3

I have a servlet that updates a table via this bean. I hit the servlet  
and the row is created just fine. An external application (not using  
beans) remove the record from the db. I then hit the servlet again -  
this time when the code does the create() method I get the exception  
at the end of this message.

If I hit the servlet again - it goes through fine.

I tried using commit-option B and C in the standardjboss.xml file(yes,  
restarting the server each time I changed the options).

I even tried adding it to the jboss.xml for that bean like this:
.
.
.
container-configurations
container-configuration
container-nameStandard CMP 2.x EntityBean/container-name
commit-optionB/commit-option
/container-configuration
/container-configurations
/jboss
Any idea why its not working on that first hit after the record is  
removed by the external app?

14:09:21,009 ERROR [LogInterceptor] RuntimeException:

java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN,  
ID = 12345600

??? at  
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCach 
e.java:222)

??? at  
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstan 
ceInterceptor.java:103)

??? at  
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterc 
eptor.java:79)

??? at  
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreati 
onInterceptor.java:44)

??? at  
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterc 
eptor.java:111)

??? at  
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercepto 
rCMT.java:178)

??? at  
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java 
:52)

??? at  
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercepto 
r.java:105)

??? at  
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129 
)

??? at  
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)

??? at org.jboss.ejb.Container.invoke(Container.java:730)

??? at  
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)

??? at  
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

??? at  
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)

??? at  
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java: 
102)

??? at  
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.ja 
va:77)

??? at  
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)

??? at  
org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)

??? at  
org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)

??? at $Proxy173.create(Unknown Source)

??? at  
com.newnetco.trivialpursuit.servlets.LoginServlet.handleRequest(LoginSe 
rvlet.java:185)

??? at  
com.newnetco.trivialpursuit.servlets.TrivialPursuitServlet.doRequest(Tr 
ivialPursuitServlet.java:264)

??? at  
com.newnetco.tools.servlet.BaseServlet.service(BaseServlet.java:516)

??? at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

??? at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic 
ationFilterChain.java:247)

??? at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil 
terChain.java:193)

??? at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal 
ve.java:260)

??? at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:643)

??? at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)

??? at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

??? at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal 
ve.java:191)

??? at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 
invokeNext(StandardPipeline.java:643)

??? at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato 
rBase.java:471)

??? at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. 

Re: [JBoss-user] Jboss dynamic ql ?

2003-03-10 Thread Dain Sundstrom
Or you can pick through the test suite for an example... or read the 
cmp slides from last year's JBossOne seminar.  There are some bugs in 
the slides but you will get the idea.

-dain

On Monday, March 10, 2003, at 02:21 PM, Hunter Hillegas wrote:

Truly the best advice is to buy the docs. They are worth it.

From: Brijesh Sood [EMAIL PROTECTED]
Organization: Net4India Pvt Ltd.
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 Mar 2003 00:53:40 +0530
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Jboss dynamic ql  ?
Hi  Anyone has idea of jboss dynamic ql .i have posted this message 
before
but no body seems seems to interested in replying .
if someone can provide some help :) it would be great.. thanks in 
advance

- Original Message -
From: Rupp,Heiko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 1:54 PM
Subject: RE: [JBoss-user] Jboss dynamic ql ?

Hi,

hi all ,  can someone provide some sample code of jboss dynamic ql
There is one at least in the for-pay CMP doc (which is good reading
anyway).
  Heiko

--
Bancotec GmbH  EMail: [EMAIL PROTECTED]
Calwer Str. 33 Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/


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


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


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


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


Re: [JBoss-user] Velocity, Servlets, and Local EJBs

2003-03-06 Thread Dain Sundstrom
TransactionServletFilter: on entry start a transaction and on exit 
commit it.

-dain

On Thursday, March 6, 2003, at 11:46 AM, [EMAIL PROTECTED] wrote:

I want to use Velocity.  I would like my Servlet to simply place my 
Local
EJBs inside of the Velocity template's context and then the template 
call
methods on the EJB.  That's the simplest way, but I know that each 
call to
getXXX() would most likely require a new transaction.  So, is it 
better to
put value objects into the context or can I set up a transaction so 
that all
getXXX() calls would occur within the same transaction?

Thanks,
Michael
---
This SF.net email is sponsored by: Etnus, makers of TotalView, The 
debugger
for complex code. Debugging C/C++ programs can leave you feeling lost 
and
disoriented. TotalView can help you find your way. Available on major 
UNIX
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] DynamicQL concurrency problem

2003-03-05 Thread Dain Sundstrom
Can you file a bug report on this?

-dain

On Wednesday, March 5, 2003, at 11:20 AM, Mauricio Hiroshi Nagaoka  
wrote:

Hello people!

I've been using DynamicQL with CMP Entity Beans in JBoss 3.0.6 and  
it's working quite well, except for a little problem. When I've more  
than one client running a DynamicQL query at the same time over the  
same CMP Entity Bean, sometimes I got the following exception:

2003-02-20 18:58:29,857 ERROR [org.jboss.ejb.plugins.LogInterceptor]  
TransactionRolledbackLocalException, causedBy:
java.lang.NullPointerException
at  
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbs 
tractQueryCommand.java:161)
at  
org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQL 
Query.java:101)
at  
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSe 
lectorBridge.java:64)
at  
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(E 
ntityBridgeInvocationHandler.java:96)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at  
br.com.smbsoftware.webflow.tc.entity.TaskInfoBean$Proxy.ejbSelectGeneri 
c(generated)
at  
br.com.smbsoftware.webflow.tc.entity.TaskInfoBean.ejbHomeSelectGeneric( 
TaskInfoBean.java:731)
at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at  
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityCon 
tainer.java:1138)
at  
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractIntercepto 
r.java:73)
at  
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Entit 
ySynchronizationInterceptor.java:207)
at  
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke 
Home(CachedConnectionInterceptor.java:215)
at  
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractIntercepto 
r.java:73)
at  
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstan 
ceInterceptor.java:90)
at  
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterc 
eptor.java:79)
at  
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreati 
onInterceptor.java:44)
at  
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterc 
eptor.java:111)
at  
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercepto 
rCMT.java:228)
at  
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java 
:62)
at  
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercepto 
r.java:105)
at  
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129 
)
at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
at  
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLo 
calContainerInvoker.java:230)
at  
org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:1 
10)
at $Proxy198.selectGeneric(Unknown Source)
at  
br.com.smbsoftware.webflow.tc.session.TaskControlBean.getTaskInfoId(Tas 
kControlBean.java:932)
at sun.reflect.GeneratedMethodAccessor483.invoke(Unknown Source)
at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
rImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at  
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Sta 
telessSessionContainer.java:660)
at  
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke 
(CachedConnectionInterceptor.java:186)
at  
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Statel 
essSessionInstanceInterceptor.java:77)
at  
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterc 
eptor.java:107)
at  
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercepto 
rCMT.java:228)
at  
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
at  
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.ja 
va:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at  
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContaine 
r.java:313)
at  
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalC 
ontainerInvoker.java:301)
at  
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessi 
onProxy.java:81)
at $Proxy208.getTaskInfoId(Unknown Source)
at  
br.com.smbsoftware.webflow.tc.TaskControlDelegate.getTaskInfoId(TaskCon 
trolDelegate.java:348)
at  
br.com.smbsoftware.bombril.struts.SearchTaskAction.execute(SearchTaskAc 
tion.java:87)
at  
org.apache.struts.action.RequestProcessor.processActionPerform(RequestP 
rocessor.java:446)
at  
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java 
:266)
at  
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at  
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at 

Re: [JBoss-user] Caching large data structures

2003-03-05 Thread Dain Sundstrom
Boy I wish I had been online yesterday...

Davide,

I think what you want is the equivalent of a clustered commit option A.  
 This means that when an object is changed on one machine in the  
cluster the change is instantly visible on all nodes in the cluster.   
In this scenario you end up with two problems, distributed locking and  
data replication.  Neither of these are trivial issues.  In JBoss 4.0  
we hope to have a solution to this problem integrated into the  
persistence engine, but that does not help you today.

Do you really need a clustered solution today?  A single old machine  
can easily handle 4 tx/sec, especially when the transaction are simply  
buy/sell orders. But, you want automatic failover so that is going to  
cost...

For the distributed locking problem you can delegate locking to the  
database by using select for update (set row-locking true for CMP).
For replication, I suggest you use distributed invalidation (bill wrote  
some stuff for this but I don't know how you turn it on).  This means  
that when an object is changed (committed) you invalidate (the cache)  
of the instance on other nodes in the cluster.  You will also have to  
use optimistic locking because you can get drift between commit and  
invalidation replication (Alexey wrote this).

Getting all this to work is a chore, but possible.  There are guys  
using systems like this today in production.

-dain

On Tuesday, March 4, 2003, at 02:36 PM, David Jencks wrote:

On 2003.03.04 12:49 Davide wrote:
Hi David, thank you for your reply, I remember your precious help on  
the
Connector mailing list.

David Jencks wrote:
you should expect a clustered solution to have slightly more latency
than
an equivalently configured (with same commit option) non clustered
solution: there is more communication.  However by adding more   
servers
you
should be able to get higher throughput as well (again, with the same
commit option).
Of course, Thing is that I need to use option B on cluster as stated  
on
Jboss
docs. In this case I loose completely the caching mechanism. This is  
the
reason
because I'm seeing performances degradation.
I looked at the seppuku pattern but it's tied to BEA features.
?? We have something named like this but I don't know exactly what it  
does.

It's very interesting the ACE pattern that it's vendor independent

http://www.theserverside.com//patterns/ 
thread.jsp?thread_id=10610article_count=47#35119

But also this solution implies a large code rewriting an right now I'm
not able
to completely evaluate it.
I am not an expert on this!!
I know, I hope to receive some suggestion from Sacha

My understanding is that guaranteed correct reads can only
be obtained with a distributed cache which is now under development.
Any planned date ;-) ?
jboss 4, theoretically in june.
If I do not use entity beans. Is there any way to have a singleton
Hashtable
available to my application ?
Sure, write an mbean to hold and manage it.

david jencks
Thank you in advance

Davide







---
This SF.net email is sponsored by: Etnus, makers of TotalView, The
debugger
for complex code. Debugging C/C++ programs can leave you feeling lost  
and

disoriented. TotalView can help you find your way. Available on major
UNIX
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Etnus, makers of TotalView, The  
debugger
for complex code. Debugging C/C++ programs can leave you feeling lost  
and
disoriented. TotalView can help you find your way. Available on major  
UNIX
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Issue with LIKE CONCAT(?1,'%') in JBoss-QL

2003-02-27 Thread Dain Sundstrom
And what would the correct query be?

-dain

On Thursday, February 27, 2003, at 02:37 PM, Curt Johnson wrote:

I've checked the forums, mailing list and for-pay docs, everything  
seems to say that this will work.
What I get in the debug statements from the CMP engine is:

2003-02-27 15:11:04,182 DEBUG  
[org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.Address.findLikeAddres 
s] Executing SQL: SELECT DISTINCT t0_o.id FROM address t0_o WHERE  
t0_o.address1 LIKE (? || '%') OR t0_o.city LIKE (? || '%') OR  
t0_o.state LIKE (? || '%') OR t0_o.country LIKE (? || '%') OR  
t0_o.postal_code LIKE (? || '%')

The relevent lines from jbosscmp.xml are

/query-method
 jboss-ql
   ![CDATA[
 SELECT DISTINCT OBJECT(o) FROM Address o
 WHERE o.address1 LIKE CONCAT(?1,'%')
OR o.city LIKE CONCAT(?2,'%')
OR o.state LIKE CONCAT(?3,'%')
OR o.country LIKE CONCAT(?4,'%')
OR o.postalCode LIKE CONCAT(?5,'%')
   ]]
 /jboss-ql
/query
I'm using JBoss 3.06 + Tomcat 4.1.18 with PostgreSQL 7.3 on RedHat 8.0  
with Sun JVM 1.4.1.

Should I file a bug report or is there something I'm missing?

Curt Johnson
Tampa Open Source Java Guru


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


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


Re: [JBoss-user] Issue with LIKE CONCAT(?1,'%') in JBoss-QL

2003-02-27 Thread Dain Sundstrom
On Thursday, February 27, 2003, at 04:14 PM, Curt Johnson wrote:

I'm trying to match the beginning of the column with the parameter 
value. Shouldn't CONCAT concatenate the parameter and the % character 
for which then becomes the argument for the LIKE operator? In other 
words if I had some jboss-ql that was LIKE CONCAT('abc','def'), 
shouldn't I expect the SQL to be LIKE 'abcdef' rather than LIKE 
('abc' || 'def')?
No.  The JBossQL compiler simply translates.

SELECT DISTINCT t0_o.id FROM address t0_o WHERE  t0_o.address1 LIKE 
'?%' OR t0_o.city LIKE '?%' OR  t0_o.state LIKE '?%' OR t0_o.country 
LIKE '?%' OR  t0_o.postal_code LIKE '?%'
Does that query work?  I would guess it is not legal.

I've seen people using the substring matches, but those make for 
horrendous SQL debugging.
You can preprocess the arguments to the query and add the '%' to the 
end of your arguments.  Preprocessing arguments is a common task and 
most people write a home method (instead of a finder) which process the 
args.  For example:

// Home Interface
Collection selectSomeStuff(String arg1, ...);
// Bean Implementation
public Collection ejbHomeSelectSomeStuff(String arg1, ...) {
   return ejbSelectSomeStuff(arg1 + %, ...);
}
public abstract Collection ejbSelectSomeStuff(String arg1, ...);
Simple?

-dain



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


Re: [JBoss-user] EntityBean findAll() method

2003-02-26 Thread Dain Sundstrom
One word 'profiler'.

-dain

On Wednesday, February 26, 2003, at 04:32 PM, Rafal Kedziorski wrote:

hi,

At 09:24 26.02.2003 -0500, David Jencks wrote:
You can find out how to configure this stuff and why it works the way 
it
does in the for pay cmp docs or by looking for the numerous less 
complete
explanations about transactions, read-ahead page size, etc in the 
mailing
lists and forums.  The docs will save you a lot of time.
i've done some tests:
- PostgreSQL 7.3.2
- JBoss 3.0.6
- J2SE 1.4.1_01
one table with two cols (id, name) with 1002 entries

1st test:
read-ahead
  strategyon-find/strategy
  page-size2/page-size
  eager-load-group*/eager-load-group
/read-ahead
needed about 4,2 sec. (=100%)

2nd test:
read-ahead
  strategyon-find/strategy
  page-size4/page-size
  eager-load-group*/eager-load-group
/read-ahead
needed about 6,4 sec. (+52% copared to 1st test)

3rd test:
read-ahead
  strategyon-find/strategy
  page-size10/page-size
  eager-load-group*/eager-load-group
/read-ahead
needed about 23,4 sec. (+457% copared to 1st test)

for every test, the server was started again.

why the big differences?

Rafal

david jencks

On 2003.02.26 06:57 Rafal Kedziorski wrote:
 Hi,

 my every entity beas has findAll() method defined in ejb-jar.xml as
 follow:

 query
   query-method
 method-namefindAll/method-name
   method-params/
   /query-method
   ejb-ql![CDATA[SELECT OBJECT(o) FROM firm o]]/ejb-ql
 /query

 Could be this done better by other mechanism? JBoss are generating 
this
 query for PostgreSQL:

 // get all id's
 LOG:  query: SELECT t0_o.firm_id FROM firm t0_o

 // call for every id
 LOG:  query:
 SELECT firm_id,name FROM firm WHERE (firm_id=1) OR (firm_id=2) OR
 (firm_id=1046258766552575) OR (firm_id=1046258766812847) OR
 (firm_id=1046258766781998) OR (firm_id=1046258766823725) OR (
 firm_id=1046258766815290) OR (firm_id=1046258766821931) OR
 (firm_id=1046258766808355) OR (firm_id=1046258766805899) OR
 (firm_id=1046258766840567) OR (firm_id=1046258766818653) OR
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766821931) OR (firm_id=1046258766808355) OR
 (firm_id=1046258766805899) OR (firm_id=1046258766840567) OR
 (firm_id=1046258766818653) OR (
 firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766818653) OR (firm_id=1046258766857549) OR
 (firm_id=1046258766870043)

 ...

 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)

 ...

 // last sql query
 LOG:  query: SELECT firm_id,name FROM firm WHERE
 (firm_id=1046258766870043)


 why are sending JBoss not for every firm_id one query?

 I have other tables, where are stored much more values. which 
generate
 than longer query.


 Best Regards,
 Rafal



 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive 
scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and 
more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] 10.5.6 finder missing query element exception with 3.0.6

2003-02-19 Thread Dain Sundstrom
The EJB spec requires you to have an ejb-ql element, but if the query  
is not implemented in ejb-ql, just leave the element empty.  It is a  
signal when porting the application to another platform that a query is  
not portable.

-dain

On Wednesday, February 19, 2003, at 03:05 PM, Frank Morton wrote:

Moving from jboss 3.0.2 to 3.0.6, now getting deployment errors on all  
finder methods:

Bean   : Profile
Method : public abstract Profile findByProfileHandle(String) throws  
FinderException
Section: 10.5.6
Warning: Every finder method except findByPrimaryKey(key) must be  
associated with a query element in the deployment descriptor.

So, I thought this meant I needed to include something like the  
following in ejb-jar.xml
or jbosscmp-jdbc.xml like the docs describe for the bean:

query
query-method
method-namefindByProfileHandle/method-name
method-paramsmethod-paramjava.lang.String/method-param/method- 
params
/query-method
declared-sql
where![CDATA[ profilehandle = ?1 ]]/where
order/order
/declared-sql
/query

Neither made a difference. In ejb-jar.xml it insists on a ejb-ql  
tag, so I added the
following to ejb-jar.xml instead, which still generated the same  
problem:

query
query-method
method-namefindProfileHandle/method-name
method-paramsmethod-paramString/method-param/method-params
/query-method
ejb-ql![CDATA[
SELECT OBJECT(p)
FROM profile p
WHERE p.profileHandle = ?1
]]/ejb-ql
/query

What is the cause of this error?



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] jetty filter question

2003-02-19 Thread Dain Sundstrom
DTDs are very sensitive to order.  Look at the DTD and make sure your 
elements are *in the exact same order* as listed in the DTD.

-dain

On Wednesday, February 19, 2003, at 03:58 PM, Frank Morton wrote:

I would like to run a filter on every jsp with 3.0.6. I thought if I 
put the following:

 filter
  filter-nameTidy/filter-name
  
filter-classcom.base2inc.app.filter.FilterTidy/filter-class
 /filter

 filter-mapping
  filter-nameTidy/filter-name
  url-pattern/*.jsp/url-pattern
 /filter-mapping

in the web.xml file for the application that it would run the Tidy
filter on each page.

When I do this, I get the message:

org.jboss.deployment.DeploymentException: Element web-app does not 
allow filter here.;

Where is the right here?

Thanks.



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss Generating Some Bad SQL

2003-02-11 Thread Dain Sundstrom
Dave that is not what I said.  In the case that there happens to be two 
rows with the same x value and different y values, I don't care. 
Otherwise I do.

Bases on what you have posted, how do you think we should handle this 
case in EJB land?  Should we just throw an error saying too bad?  One 
of the big short comings of EJB-QL is you can't select more then one 
field.  We will be adding a the ability to select multiple columns to 
JBossQL in JB4, but what should we do in the mean time, and how should 
we treat this for EJB-QL in JB4?

Anyway, I think it is completely obvious what the user wanted when he/ 
she wrote the query.

-dain

On Monday, February 10, 2003, at 08:24 PM, Dave Smith wrote:

If you do not care how it is ordered then why bother with the order by 
clause?  The database is correct , you are not.

Dain Sundstrom wrote:


On Monday, February 10, 2003, at 01:53 PM, Dave Smith wrote:


No, it isn't.  Consider

SELECT DISTINCT x FROM tab ORDER BY y;

Assuming there are multiple values of y for any given x, how would 
you
expect the result to be sorted?  It's ill-defined.


There is nothing ill defined by this.  You want all of the distinct 
entries of x ordered by y.  If two x values have the different y 
values.  I simply don't care which one you choose to order by.  Sure 
you can get non deterministic results, but there is enough 
information to execute the query.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss Generating Some Bad SQL

2003-02-10 Thread Dain Sundstrom
Let me restate my response.

I think that the databases that do not support having columns in the 
order that are not in the select are lame.  There is no reason why it 
can not figure out which column it will need to sort and add these to 
the select under the covers.  This is simply a complaint of mine.  
Jeremy has already changed our sql generator to generate the sql so the 
lame database implementations will work.

-dain

On Monday, February 10, 2003, at 02:24 AM, KRALIK Vladimir wrote:

I think, this is another problem. Message say :

ERROR:  For SELECT DISTINCT, ORDER BY expressions must appear in
target list

Which mean, that columns used in ORDER BY-expression are not used in
TARGET.

So in that select :

SELECT DISTINCT t0_s.rec_num FROM sample_request t0_s,
sample_request_line_item t1_li WHERE (t1_li.fulfillment_status =
'Shipped'
AND t1_li.followup_date = '2003-02-04 20:00:00.0+00' AND
(t1_li.customer_prospect_feedback IS NULL OR
t1_li.customer_prospect_feedback = '')) AND
(t0_s.rec_num=t1_li.parentRequest) ORDER BY
t0_s.date_of_request DESC


Target : DISTINCT t0_s.rec_num
Order by : t0_s.date_of_request

I've experience with INFORMIX, and this select is wrong for INFORMIX.

		vlk



-Original Message-
From: Dain Sundstrom [mailto:[EMAIL PROTECTED]]
Sent: 8. februara 2003 16:47
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JBoss Generating Some Bad SQL


We have the same problem with Oracle.  I personally think
this is a bug
with both of the databases.



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] JBoss Generating Some Bad SQL

2003-02-10 Thread Dain Sundstrom

On Monday, February 10, 2003, at 01:53 PM, Dave Smith wrote:


No, it isn't.  Consider

SELECT DISTINCT x FROM tab ORDER BY y;

Assuming there are multiple values of y for any given x, how would you
expect the result to be sorted?  It's ill-defined.


There is nothing ill defined by this.  You want all of the distinct 
entries of x ordered by y.  If two x values have the different y 
values.  I simply don't care which one you choose to order by.  Sure 
you can get non deterministic results, but there is enough information 
to execute the query.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss Generating Some Bad SQL

2003-02-08 Thread Dain Sundstrom
We have the same problem with Oracle.  I personally think this is a bug 
with both of the databases.  I see no reason why the query processor 
can't figure out the correct way to form a internal query object; we 
can.

I'll ask Jeremy if he wants to work this out in in 3.2.  Otherwise 
you'll have to wait for 4.0.

-dain

On Friday, February 7, 2003, at 09:03 PM, Rod Macpherson wrote:

PostgreSQL does not allow an aggregated field reference to appear in 
the
where clause.

SELECT DISTINCT t0_s.rec_num ... WHERE ... t0_s.rec_num=t1 ...

Guess DISTINCT by itself is considered an aggregate rather than a
pre-aggregate filter. Possible solutions: a) fix PostgreSQL so that it 
does
not treat DISTINCT as a bona fide aggregate in an of itself;  b) fix
PostgreSQL so that it does not impose the aggregated column cannot 
appear
in where clause limitation; c) remote DISTINCT from your query since
rec_num ottabee unique anyway.


- Original Message -
From: Hunter Hillegas [EMAIL PROTECTED]
To: JBoss User [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 1:11 PM
Subject: [JBoss-user] JBoss Generating Some Bad SQL


I am running my dev environment on JBoss 3.2 RC1...

I am using JBossQL to override a query.

My JBossQL statement is as follows:

SELECT DISTINCT OBJECT(s) FROM SampleRequestBean s, IN (s.lineItems) 
li
WHERE li.fulfillmentStatus = 'Shipped' AND li.followupDate = ?1 AND
(li.customerProspectFeedback IS NULL OR li.customerProspectFeedback = 
'')
ORDER BY s.dateOfRequest DESC

This generates this SQL:

SELECT DISTINCT t0_s.rec_num FROM sample_request t0_s,
sample_request_line_item t1_li WHERE (t1_li.fulfillment_status = 
'Shipped'
AND t1_li.followup_date = '2003-02-04 20:00:00.0+00' AND
(t1_li.customer_prospect_feedback IS NULL OR
t1_li.customer_prospect_feedback = '')) AND
(t0_s.rec_num=t1_li.parentRequest) ORDER BY t0_s.date_of_request DESC

My database (PostgreSQL 7.2 and 7.3) complains as such:

ERROR:  For SELECT DISTINCT, ORDER BY expressions must appear in 
target
list


So... Any suggestion on how I can tweak this to get the correct SQL 
out of
JBossCMP? Gracias!

Hunter



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] EJB QL error

2003-02-07 Thread Dain Sundstrom

On Friday, February 7, 2003, at 09:48 AM, Rafal Kedziorski wrote:


ejb-ql![CDATA[SELECT OBJECT(o) FROM firm o WHERE o.name = 
?1]]/ejb-ql

After start JBoss I get this error:

Was expecting one of:
   IN ...
   ABSTRACT_SCHEMA ...
   )]

I am going to guess the full error said Found 'firm' Was expecting one 
of:

This means that 'firm' is not the literal IN, and 'firm' is not a 
know abstract schema name.  Did you declare that your firm entity have 
an abstract-schema-name of 'firm'?  If not do it.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Problem with Query containing LIKE

2003-02-06 Thread Dain Sundstrom
EJB-Ql in EJB 2.0 does not allow parameters in the like clause.  EJB 
2.1 does have this support but 2.1 will not be supported until JBoss 
4.0.  In the mean time use JBossQL which supports parameters in the 
like clause.

-dain

On Thursday, February 6, 2003, at 05:54 AM, Rupp,Heiko wrote:

Hi,


-Original Message-
From: Langelage, Frank [mailto:[EMAIL PROTECTED]]
 *   query=SELECT OBJECT(o) FROM Address AS o WHERE o.matchcode LIKE 
?1


On deployment of the EntityBean I get an exception.
The EJBQLCompiler JBoss4 doesn't like this. It wants a STRING_LITERAL
after LIKE.


Try: ... WHERE o.matchcode LIKE '?1'

--
Bancotec GmbH  EMail: [EMAIL PROTECTED]
Calwer Str. 33 Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Problem with Query containing LIKE

2003-02-06 Thread Dain Sundstrom
EJB-Ql in EJB 2.0 does not allow parameters in the like clause.  EJB 
2.1 does have this support but 2.1 will not be supported until JBoss 
4.0.  In the mean time use JBossQL which supports parameters in the 
like clause.

-dain

On Thursday, February 6, 2003, at 05:54 AM, Rupp,Heiko wrote:

Hi,


-Original Message-
From: Langelage, Frank [mailto:[EMAIL PROTECTED]]
 *   query=SELECT OBJECT(o) FROM Address AS o WHERE o.matchcode LIKE 
?1


On deployment of the EntityBean I get an exception.
The EJBQLCompiler JBoss4 doesn't like this. It wants a STRING_LITERAL
after LIKE.


Try: ... WHERE o.matchcode LIKE '?1'

--
Bancotec GmbH  EMail: [EMAIL PROTECTED]
Calwer Str. 33 Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] RE: question about jboss cmp

2003-01-30 Thread Dain Sundstrom
On Wednesday, January 29, 2003, at 08:15 AM, Eric J Kaplan wrote:


No (I wasn't implying it was easy) but without it, for a lot of
applications going through the entity beans isn't practical.  More 
often
than not, the applications we work on do NOT simply findByPrimaryKey,
but instead need to load based upon a query.  I take what Mark Fleury
says in his paper to heart about taking advantage of the cacheing
capabilities of the container, but not if I have to go to the database
anyway to find all the primary keys every time...

Yes cache is king.  There are two solutions here: all data is in 
memory, or we cache query results.  I have been told the first is 
fairly easy, and all we would have to do is expose the data to a 
hypersonic query engine and generate some queries.   The second is also 
fairly easy.  We cache results keyed on the ejb-ql and parameters.  
When when we find a match we, return the results from the cache.  When 
the data changes in any of the query domain we flush the cache.  This 
assumes that the cache can be notified of any changes, which means 
commit option A until we have a physical store notifications.

We've found anytime we've had slowness in our application, it's a
session bean going through an entity bean's home interface to find a
bunch of beans, and we have to change to direct jdbc, thereby bypassing
the container.  This is not JBoss specific, it's a general problem.
Bottom line is, for mostly read-only apps with limited write, entity
beans can be overkill.  Yes, there is a speedup if the beans are 
already
in memory of just going to the db to find the primary keys and then
pulling the data from the beans already in memory, but the penalty one
has to pay if the beans are NOT in memory is severe (one by one, the
container goes back to the db to grab each row).

This is an only problem.  I am surprised you have not already heard of 
the read-ahead patches around this.

As for the in-memory query resolver, I thought this was what jdo and
jdo-ql were all about?  We have to do similar things in our application
on the client side for holding onto local copies of objects and 
limiting
unnecessary calls back out to the app server to get new objects.

JDO is simply an interface to a persistence system.  In the end it is 
all about implementation.  We plan on adding support to all of this in 
JBoss, and transparently to you.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] RE: question about jboss cmp

2003-01-30 Thread Dain Sundstrom
On Wednesday, January 29, 2003, at 09:30 AM, Eric J Kaplan wrote:


Thanks David.  You've answered my question.  Is this read-ahead
capability a specific feature of jboss or in the spec?  One issue we
have is that as much as we push jboss, we have installs where they for
whatever reason aren't using jboss.


All tuning options are vendor specific.  You should really read the EJB 
specification.  Specifically pay attention to what they don't address.  
For example, all physical store mappings and tuning are out of the spec.

About read-ahead.  If I enable it, and I execute an initial finder that
reads ahead and caches, and then someone else comes, my understanding 
is
they still have to go back to the db to find primary keys.  Will they
also read ahead as well?  If so, aren't they grabbing extra data that's
already in memory?

Currently JBoss always goes back to the Database for the primary keys.  
A query cache is on the todo list for 4.0 and an in-memory query engine 
may also make it.

As for caching between transactions it depends on the commit option.  I 
have code in 4.0 (just haven't gotten to the back port yet) that merges 
the transaction cache in the main cache after the tx commits, but this 
only works with commit option A, as B and C always throw out the cache 
data when the new transaction starts.  We hope to address that with 
Optimistic locking in 4.0.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Getting Distinct to Use UCASE() or UPPER() in JBossQL or DeclaredSQL??

2003-01-28 Thread Dain Sundstrom
Hunter,

There is no way to do this with EJB-QL or JBossQL.  The problem is we 
don't support functions in the SELECT clause.  This is planned for 4.0 
but that doesn't help you.  I think the only way to implement this it 
to use a BMP style finder method.

Sorry,

-dain

On Tuesday, January 28, 2003, at 11:47 AM, Hunter Hillegas wrote:

I am trying to get the following query to the DB:

SELECT DISTINCT UPPER(vendor) FROM sample_request_line_item WHERE 
vendor IS
NOT NULL ORDER BY vendor;

EJBQL has no UPPER or UCASE, so it is out.

I tried JBossQL as such:

SELECT DISTINCT UCASE(s.vendor) FROM SampleRequestLineItemBean s WHERE
s.vendor IS NOT NULL ORDER BY s.vendor

That resulted in a parse error:

Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered
UCASE at line 1, column 17.
Was expecting one of:
OBJECT ...
NUMERIC_VALUED_PATH ...
STRING_VALUED_PATH ...
DATETIME_VALUED_PATH ...
BOOLEAN_VALUED_PATH ...
ENTITY_VALUED_PATH ...
VALUE_CLASS_VALUED_PATH ...

Ok So I am now looking at declaredSQL from Dain's docs...

But to specify distinct there, you just insert a tag. Also, the select 
tags
just contain the EJB name and would look like this:

declared-sql
select
/distinct
ejb-nameSampleRequestLineItemBean/ejb-name
aliaslineItem/alias
/select
...
/declared-sql

It doesn’t look like I can insert the logic there...

Any ideas? The raw SQL runs on the database (PostgreSQL) just fine...

JBoss 3.2.0 RC1 on MacOS X 10.2.x.

Thanks,
Hunter



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld  Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Getting Distinct to Use UCASE() or UPPER() in JBossQL or DeclaredSQL??

2003-01-28 Thread Dain Sundstrom
This has nothing to do with SQL.  It is purely an EJB thing.  The spec 
including the 2.1 spec has not seen fit to support functions in the 
select (other then aggregates), and I simply didn't think of adding it, 
as I was focused on getting the spec to work.  In 4.0 we are rethinking 
everything in CMP and a full SQL-99ish query language is on the table.

BTW, EJB-QL doesn't have an UPPER function in the 2.1 spec.

-dain

On Tuesday, January 28, 2003, at 12:51 PM, Hunter Hillegas wrote:

Is that a JBoss restriction or a SQL restriction?

PostgreSQL allows it, but I don't know if they are following the SQL 
spec on
that one.

Can you guys think of another way to get my desired results?

Basically I want the distinct operation to not be case sensitive. I 
have a
list of strings... Some upper case, some lower case and I want them 
all to
sort alpha, without regard to case.

Thanks in advance,
Hunter

From: Alex Loubyansky [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Tue, 28 Jan 2003 20:06:43 +0200
To: Hunter Hillegas [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Getting Distinct to Use UCASE() or UPPER() 
in
JBossQL or DeclaredSQL??

Hunter,

you can't use functions in the SELECT, they are allowed only in
the WHERE clause.

alex

Tuesday, January 28, 2003, 7:47:06 PM, you wrote:

HH I am trying to get the following query to the DB:

HH SELECT DISTINCT UPPER(vendor) FROM sample_request_line_item WHERE 
vendor
IS
HH NOT NULL ORDER BY vendor;

HH EJBQL has no UPPER or UCASE, so it is out.

HH I tried JBossQL as such:

HH SELECT DISTINCT UCASE(s.vendor) FROM SampleRequestLineItemBean s 
WHERE
HH s.vendor IS NOT NULL ORDER BY s.vendor

HH That resulted in a parse error:

HH Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: 
Encountered
HH UCASE at line 1, column 17.
HH Was expecting one of:
HH OBJECT ...
HH NUMERIC_VALUED_PATH ...
HH STRING_VALUED_PATH ...
HH DATETIME_VALUED_PATH ...
HH BOOLEAN_VALUED_PATH ...
HH ENTITY_VALUED_PATH ...
HH VALUE_CLASS_VALUED_PATH ...

HH Ok So I am now looking at declaredSQL from Dain's docs...

HH But to specify distinct there, you just insert a tag. Also, the 
select
tags
HH just contain the EJB name and would look like this:

HH declared-sql
HH select
HH /distinct
HH ejb-nameSampleRequestLineItemBean/ejb-name
HH aliaslineItem/alias
HH /select
HH ...
HH /declared-sql

HH It doesn’t look like I can insert the logic there...

HH Any ideas? The raw SQL runs on the database (PostgreSQL) just 
fine...

HH JBoss 3.2.0 RC1 on MacOS X 10.2.x.

HH Thanks,
HH Hunter




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld  Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] serious ejbql compiler problem

2003-01-17 Thread Dain Sundstrom
This is a bug. Please file a bug report at sourceforge.

MEMBER OF should be generating a sub select or a left join.  This is 
simmilar to the IS NULL bug we recently fixed.

-dain

On Friday, January 17, 2003, at 02:49 AM, Alexey Yudichev wrote:

The query you proposed makes a join using both relationships as well:

SELECT t0_c.id FROM storecategory t0_c, partner t2_p, partner 
t3_c_partners, partner_categories_stor_1cl2gdd 
t4_c_partners_RELATION_TABLE, partner t1_c_partnerOwner WHERE (t0_c.id 
= ? AND (t1_c_partnerOwner.id = ? OR (t2_p.id = ? AND 
(t3_c_partners.id = t2_p.id AND 
(t0_c.id=t4_c_partners_RELATION_TABLE.StoreCategory AND 
t3_c_partners.id=t4_c_partners_RELATION_TABLE.Partner AND 
t0_c.partnerOwner=t1_c_partnerOwner.id);

you see the last clause is the same as in my original query: tables 
are joined both by Partner-Strecategories o2m relationship and 
Partners-StoreCategories m2m relationship.

I think in this case compiler should construct WHERE clause with OR 
condition at upper level something like:

SELECT sc.id FROM storecategory sc, partner p, 
partner_categories_stor_1cl2gdd rt
  WHERE sc.id=?
    AND (
  (sc.partnerOwner=p.id AND p.id='mmscity')
    OR
  (rt.storecategory=sc.id AND rt.partner=p.id AND p.id='mmscity')
    );

-Original Message-
From: Dain Sundstrom [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 19:04
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] serious ejbql compiler problem


That is the way EJB-QL works.  When you have an collection member 
declaration (i.e. the IN clause in the FROM), you are requesting a 
join.  Anyway, the following should work:

SELECT OBJECT(c)
FROM StoreCategory c, Partner p
WHERE c.id=?1 AND (c.partnerOwner.id=?2 OR (p.id=?2 AND p MEMBER OF 
c.partners)

You many want to do a SELECT DISTINCT, as it is possible to get 
multiple results back from this query.

-dain

On Thursday, January 16, 2003, at 03:39 AM, Alexey Yudichev wrote:

 Jboss 3.0.4.

 2 entities: StoreCategory and Partner.
 2 relationships between them:

 1)
     ejb-relation
   ejb-relation-namePartner - StoreCategory/ejb-relation-name
   ejb-relationship-role
 
 ejb-relationship-role-namePartnerStoreCategoryRole/ejb-
 relationship-role-name
     multiplicityOne/multiplicity
     relationship-role-source
   ejb-namePartner/ejb-name
     /relationship-role-source
     cmr-field
   cmr-field-namestoreCategories/cmr-field-name
   cmr-field-typejava.util.Collection/cmr-field-type
     /cmr-field
   /ejb-relationship-role
   ejb-relationship-role
 
 ejb-relationship-role-nameStoreCategoryPartnerRole/ejb-
 relationship-role-name
     multiplicityMany/multiplicity
     relationship-role-source
   ejb-nameStoreCategory/ejb-name
     /relationship-role-source
     cmr-field
   cmr-field-namepartnerOwner/cmr-field-name
     /cmr-field
   /ejb-relationship-role
     /ejb-relation

 2)
     ejb-relation
   ejb-relation-namePartners - StoreCategory/ejb-relation-name
   ejb-relationship-role
 
 ejb-relationship-role-namePartnerStoreCategoryRole/ejb-
 relationship-role-name
     multiplicityMany/multiplicity
     relationship-role-source
   ejb-namePartner/ejb-name
     /relationship-role-source
     cmr-field
   cmr-field-namecategories/cmr-field-name
   cmr-field-typejava.util.Collection/cmr-field-type
     /cmr-field
   /ejb-relationship-role
   ejb-relationship-role
 
 ejb-relationship-role-nameStoreCategoryPartnerRole/ejb-
 relationship-role-name
     multiplicityMany/multiplicity
     relationship-role-source
   ejb-nameStoreCategory/ejb-name
     /relationship-role-source
     cmr-field
   cmr-field-namepartners/cmr-field-name
   cmr-field-typejava.util.Collection/cmr-field-type
     /cmr-field
   /ejb-relationship-role
     /ejb-relation

 ejbql:

 SELECT OBJECT(c) FROM StoreCategory c, IN (c.partners) 
assignedPartner
   WHERE c.id=?1 AND (assignedPartner.id=?2 OR 
 c.partnerOwner.id=?2)

 which should find specified StoreCategory participating EITHER in 
 first relationship with specified Partner OR in second one or both.

 sql generated:

 SELECT t0_c.id FROM storecategory t0_c, partner t1_assignedpartner, 
 partner_categories_stor_1cl2gdd t3_c_partners_RELATION_TABLE, 
partner 
 t2_c_partnerOwner WHERE (t0_c.id = ? AND (t1_assignedpartner.id = ? 
OR 
 t2_c_partnerOwner.id = ?)) AND 
(t0_c.partnerOwner=t2_c_partnerOwner.id 
 AND t0_c.id=t3_c_partners_RELATION_TABLE.StoreCategory AND 
 t1_assignedpartner.id=t3_c_partners_RELATION_TABLE.Partner)

 which does inner join of all three tables (StoreCategory, Partner 
and 
 M-2-M relation table). So it will by definition select 
StoreCategories 
 participating ONLY in BOTH relationships at the same time.

 Or maybe I missed something

Re: [JBoss-user] serious ejbql compiler problem

2003-01-16 Thread Dain Sundstrom
That is the way EJB-QL works.  When you have an collection member  
declaration (i.e. the IN clause in the FROM), you are requesting a  
join.  Anyway, the following should work:

SELECT OBJECT(c)
FROM StoreCategory c, Partner p
WHERE c.id=?1 AND (c.partnerOwner.id=?2 OR (p.id=?2 AND p MEMBER OF  
c.partners)

You many want to do a SELECT DISTINCT, as it is possible to get  
multiple results back from this query.

-dain

On Thursday, January 16, 2003, at 03:39 AM, Alexey Yudichev wrote:

Jboss 3.0.4.

2 entities: StoreCategory and Partner.
2 relationships between them:

1)
    ejb-relation
  ejb-relation-namePartner - StoreCategory/ejb-relation-name
  ejb-relationship-role
     
ejb-relationship-role-namePartnerStoreCategoryRole/ejb- 
relationship-role-name
    multiplicityOne/multiplicity
    relationship-role-source
  ejb-namePartner/ejb-name
    /relationship-role-source
    cmr-field
  cmr-field-namestoreCategories/cmr-field-name
  cmr-field-typejava.util.Collection/cmr-field-type
    /cmr-field
  /ejb-relationship-role
  ejb-relationship-role
     
ejb-relationship-role-nameStoreCategoryPartnerRole/ejb- 
relationship-role-name
    multiplicityMany/multiplicity
    relationship-role-source
  ejb-nameStoreCategory/ejb-name
    /relationship-role-source
    cmr-field
  cmr-field-namepartnerOwner/cmr-field-name
    /cmr-field
  /ejb-relationship-role
    /ejb-relation

2)
    ejb-relation
  ejb-relation-namePartners - StoreCategory/ejb-relation-name
  ejb-relationship-role
     
ejb-relationship-role-namePartnerStoreCategoryRole/ejb- 
relationship-role-name
    multiplicityMany/multiplicity
    relationship-role-source
  ejb-namePartner/ejb-name
    /relationship-role-source
    cmr-field
  cmr-field-namecategories/cmr-field-name
  cmr-field-typejava.util.Collection/cmr-field-type
    /cmr-field
  /ejb-relationship-role
  ejb-relationship-role
     
ejb-relationship-role-nameStoreCategoryPartnerRole/ejb- 
relationship-role-name
    multiplicityMany/multiplicity
    relationship-role-source
  ejb-nameStoreCategory/ejb-name
    /relationship-role-source
    cmr-field
  cmr-field-namepartners/cmr-field-name
  cmr-field-typejava.util.Collection/cmr-field-type
    /cmr-field
  /ejb-relationship-role
    /ejb-relation

ejbql:

SELECT OBJECT(c) FROM StoreCategory c, IN (c.partners) assignedPartner
  WHERE c.id=?1 AND (assignedPartner.id=?2 OR  
c.partnerOwner.id=?2)

which should find specified StoreCategory participating EITHER in  
first relationship with specified Partner OR in second one or both.

sql generated:

SELECT t0_c.id FROM storecategory t0_c, partner t1_assignedpartner,  
partner_categories_stor_1cl2gdd t3_c_partners_RELATION_TABLE, partner  
t2_c_partnerOwner WHERE (t0_c.id = ? AND (t1_assignedpartner.id = ? OR  
t2_c_partnerOwner.id = ?)) AND (t0_c.partnerOwner=t2_c_partnerOwner.id  
AND t0_c.id=t3_c_partners_RELATION_TABLE.StoreCategory AND  
t1_assignedpartner.id=t3_c_partners_RELATION_TABLE.Partner)

which does inner join of all three tables (StoreCategory, Partner and  
M-2-M relation table). So it will by definition select StoreCategories  
participating ONLY in BOTH relationships at the same time.

Or maybe I missed something...




---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] cmp2, postgres and dates

2003-01-13 Thread Dain Sundstrom
Postgres can't store millisecond accurate time until 7.0.  Before that 
it truncates it to a decasecond if I remember.

-dain

On Monday, January 13, 2003, at 05:06 PM, Eric Klimas wrote:

I don't think this is as much a Jboss issue as it might be a Postgres
JDBC driver issue.  I experienced this once before on Postgres 6.x
(probably 6.2).  I recently experimented again with a newer driver on
Postgres 7.x and the problem seems to have gone away.

Unfortunately, I can't offer much more than that.  Maybe try 
downloading
one of the newer JDBC drivers and try that or consider upgrading
Postgres if you're running an older version.  Also consider writing 
some
quick JDBC code to see if my theory is even correct, or if we were
experiencing different problems.

-Eric


On Mon, 2003-01-13 at 17:41, Jim Clayson wrote:
Hi,

I am experiencing a problem with dates:

jboss304tomcat406:

A 'new Date()' passed to an abstract cmp setter sets the date with a
millisecond value in the postgres table column. When it does this, it
doesn't give it back to me using the getter. The workaround is the
reformat the date (using SimpleDateFormat) so that it has no 
millisecond
value and then only can I read the value through the cmp2 engine.

I am not using any overriding settings in jbosscmp-jdbc.xml. Do I need
to provide some way to direct postgres to store dates using a 
particular
class?

Any help is appreciated.

jim



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security 
issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
--
Eric Klimas [EMAIL PROTECTED]



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Cmp vs hibernate

2003-01-11 Thread Dain Sundstrom
On Friday, January 10, 2003, at 04:44 PM, Schnitzer, Jeff wrote:


IMHO, trying to create a general-purpose persistence mechanism that
abstracts both RDBMS and ODBMS data stores is foolish.  One of the


Jeff, I couldn't disagree with you more.  To attract RDBMS guys you 
need to support RDBMS databases on the back end and full query language 
on the front.  To attract ODBMS guys you really need transparent 
persistence (something like JDO) and you need fast relational 
navigation.  Both of these can be accomplished in the same system.  
Think of something like JDO with a well written object cache.  There 
are some real tricks to the implementation but they can be overcome.  
IMO the reason we don't have this type of system today is the RDBMS 
guys don't care about the object guys and the ODBMS guys are in marc's 
words wee-wee touching OO guys.

Remember at the end of the day all the data is stored in a sequence of 
bytes in a spiral configuration on a metal(ish) platter.

really frustrating things about EJB CMP (before I ditched it in favor 
of
Hibernate, one of the best decisions I ever made) was how difficult CMP
made it to sidestep the abstraction and use aggregation queries, outer
joins, and other performance-enhancing techniques.

That is an implementation issue and does not support your first claim.  
A vendor such as jboss could support better out of band queries, and we 
plan on for 4.0.

If you are writing code and thinking to yourself hey, maybe I'll move
my datastore to an ODBMS sometime in the future then you're writing a
toy, not a serious enterprise application.  In the real world that
doesn't happen.  It's tough (organizationally and technically) just to
switch database vendors.


Now I totally agree here.  I think the bigger issue is an ODBMS has 
completely different performance characteristics then an RDBMS, and you 
end up developing to these characteristics.  For example, ODBMSes 
excels at in memory relational navigation, and RDBMSes suck at this.  
If you are using an RDBMS it is much better to jump to a location in 
the object graph using a query.  The difference between performance of 
these systems can be reduced with good caching and read-ahead logic, 
but most do not code this.

-dain



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMP2 - Field To Persist In Updates But Not Inserts

2003-01-06 Thread Dain Sundstrom
On Monday, January 6, 2003, at 07:20 AM, Nicholas wrote:


At row creation time, I do not know what that value
should be, so I want it to be null, but it appears in
CMP2 that *every* field must be persisted at insert
time.


The EJB specification requires that all fields be initialized to Java 
default values, so unless it is explicitly set in ejbCreate you will 
get a Java default set.  Beside the spec requirement, I personally 
agree with this behavior, because it results in better portability.

In JBuilder 6, the Data Source browser of the EJB
Designer component allows you to edit column CMP
properties, and there is an option to ignoreOnInsert
which exactly what I want. However, the feature seems
to have no effect on the deployment XML.


We have no such feature, but I sounds like a good option.  File a 
feature request, and it may make it into 4.0.

-dain



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


Re: [JBoss-user] CompositeName and JBoss 3.0.4

2003-01-03 Thread Dain Sundstrom
I haven't had any coffee yet today, so maybe I still a complete dumb 
ass, but what is a compound name and a composite name.

-dain

On Friday, January 3, 2003, at 09:09 AM, Michael Huneycutt wrote:

After looking at the JBoss code, it appears that JBoss only supports 
Compound Names and not Composite Names. I have something I am trying 
to hook up (TopLink), which uses Composite Names. I have no control 
over this, I found a work around, by I was looking for help in 
understanding why only Compound Name support and is there a JBoss 
solution. For more detail look at my post on TopLink in this forum.

Thanks


Mike H. Sr.

Michael Huneycutt Sr.
TRC - A perotsystems* Company
Email: [EMAIL PROTECTED]
Office FL: (813) 891-6084 x47395
Office VA: (804) 934-0977
Cell: (804) 304-7655
URL:   www.trcinc.com
   www.perotsys.com




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



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



Re: [JBoss-user] Store large pdfs with JBoss

2003-01-03 Thread Dain Sundstrom
Greg,

I completely disagree; this is not a problem with CMP but the 
implementations. The problem with every app server available including 
JBoss is the CMP engine is a black box.  In 4.0, I plan on opening this 
up so anyone can fairly easily write a physical persistence store 
manager.  This would mean that for this case, Peter could have all the 
data for a the entity in a JDBC data store except for the file which 
would be stored via a filesystem physical store manager.  Entity beans 
provide a good interface to an abstract store system.  Also with the 
aspect stuff you will be able to use the same abstract store system 
from an even easier interface.

-dain

On Friday, January 3, 2003, at 02:34 PM, Greg Turner wrote:

IMHO, this is a prime example of business data that does not fit the 
EJB model.  And you shouldn't try and shoe horn it in.  Its been my 
understanding that doing the file system access via an MBean is a 
perfectly permissible way to get around the prohibitions described in 
the Sun article.   Another option is to find or write a JCA wrapper 
for the Filesystem.



Luttrell, Peter wrote:



Actually i'm considering writing a little jmx service that manages the 
filesystem store. my ejbs would store the key that the jmx service 
requires. the service would then enforce/handle all such rules.
 
I just read this however, which articulates some of the concerns with 
any filesystem approach:
 
Fromhttp://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html:
 

Why can't EJBs read and write files and directories in the filesystem? 
And why can't they access file descriptors?

Enterprise beans aren't allowed to access files primarily because 
files are not transactional resources. Allowing EJBs to access files 
or directories in the filesystem, or to use file descriptors, would 
compromise component distributability, and would be a security hazard.

Another reason is deployability. The EJB container can choose to place 
an enterprise bean in any JVM, on any machine in a cluster. Yet the 
contents of a filesystem are not part of a deployment, and are 
therefore outside of the EJB container's control. File systems, 
directories, files, and especially file descriptors tend to be 
machine-local resources. If an enterprise bean running in a JVM on a 
particular machine is using or holding an open file descriptor to a 
file in the filesystem, that enterprise bean cannot easily be moved 
from one JVM or machine to another, without losing its reference to 
the file.
Furthermore, giving EJBs access to the filesystem is a security 
hazard, since the enterprise bean could potentially read and broadcast 
the contents of sensitive files, or even upload and overwrite the JVM 
runtime binary for malicious purposes.
Files are not an appropriate mechanism for storing business data for 
use by components, because they tend to be unstructured, are not under 
the control of the server environment, and typically don't provide 
distributed transactional access or fine-grained locking. Business 
data is better managed using a persistence interface such as JDBC, 
whose implementations usually provide these benefits. Read-only data 
can, however, be stored in files in a deployment JAR, and accessed 
with the getResource() or getResourceAsStream() methods of 
java.lang.Class.

 
 
 -Original Message-
From: James Cleary [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 12:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Store large pdfs with JBoss

Our Product Data Manager system does the same. Just stores the files 
on disk with encrypted names. The database has the URLs to the correct 
PDF for a particular document number. We can reach those URLs on our 
Apache web server. If trying the JBoss route you could modify your 
$JAVA_HOME/jre/lib/security/java.policy file to ALL Permissions for 
your local disk drive. Not very portable then but depends on the 
application/environment. Not sure how you'd reference the PDFs though. 
Maybe placing your files under a webapp directory?
  

- Original Message -
From: Nelson, Tracy
To: '[EMAIL PROTECTED]'
Sent: Friday, January 03, 2003 1:07 PM
Subject: RE: [JBoss-user] Store large pdfs with JBoss

I've always done it with the filesystem.  The database just stores the 
path to the file.  Typically you establish some rules for the 
filesystem store (retention time, max space, maybe use quotas) and 
have it owned by whatever user the app server runs as.

-Original Message-
From: Luttrell, Peter [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 09:14
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Store large pdfs with JBoss

Has anyone had experience storing large pdfs with jboss, say ~5mbs 
each?
 
I would like to do it with Oracle and BLOBs, but i've read that 
there's problems with the drivers and jboss and it doesn't look like 
it will be possible.
 
Has anyone done with with any other database?
 
Does anyone have ideas on how else 

Re: [JBoss-user] Question about CMP/CMR

2003-01-01 Thread Dain Sundstrom

On Monday, December 30, 2002, at 02:29 PM, Stefan Arentz wrote:


Huh? Foreign keys are *legacy* database structure?


Any pre existing schema is legacy to me.

-dain



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



Re: [JBoss-user] Question about CMP/CMR

2003-01-01 Thread Dain Sundstrom
On Monday, December 30, 2002, at 02:33 PM, Stefan Arentz wrote:



On Monday, Dec 30, 2002, at 19:10 Europe/Amsterdam, 
Jonathan.O'[EMAIL PROTECTED] wrote:

Stefan,
Most of our tables use a generated key (via an Oracle Sequence) as the
primary key. Any tables that wanty a foreign key reference to this, 
always
use this generated key.

Yeah that is exactly what I am doing. However, I like to have real 
constraints because I also have other clients access the database.

Any you can in 3.2.  The thing you can have is a foreign key that maps 
to a secondary key.

-dain



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


Re: [JBoss-user] Date and jboss

2002-12-30 Thread Dain Sundstrom
Kiuma,

I don't understand your question. Can you restate the question a 
different way?

-dain

On Saturday, December 28, 2002, at 08:16 AM, kiuma wrote:

Hello, I was wondering about dates and queries.
If I have a myCalendar created with new GragorianCalendar() and a 
where clause like
day = ?1.

Suppose now that myCalendar is 1/1/2003 23:59:59 99 .


What happens if i pass myCalendar.getTime() ?

If I have a row with day = 1/1/2003 15:59:59 99, Is this row in result 
set ?

Tahnks and Happy NY,

kiuma



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



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



Re: [JBoss-user] Question about CMP/CMR

2002-12-30 Thread Dain Sundstrom
On Monday, December 30, 2002, at 10:55 AM, Stefan Arentz wrote:


Alex Loubyansky wrote:


Frank,

if I understood you right, you want to map a CMR field with foreign
key to a CMP field that is not a primary key. Currently, this is not
supported.


Yeah I also removed foreign key constraints from my tables. This is 
pretty silly though.

How are other people handling this? Use another CMP2 engine? I can 
image that for many projects it is a requirement to have foreign keys 
or map to existing databases. How do you solve that with JBoss?

You don't.  CMP in JBoss 3.0 is designed to meet the spec requirements 
and not much else.  In JBoss 4.0 we will address legacy database 
structure support and mapping to non JDBC data sources.

-dain



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


Re: [JBoss-user] How to INSERT after ebjPostCreate versus ejbCreate

2002-12-30 Thread Dain Sundstrom
I've had a lot of Oracle DBAs tell me that DEFERRABLE INITIALLY 
DEFERRED does very bad things to Oracle.  I don't remember the 
details, but it was bad enough that I gave up on some code that 
depended on it.

-dain

On Monday, December 30, 2002, at 10:17 AM, Bill Burke wrote:

nice, thanks Jonathan.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Jonathan.O'[EMAIL PROTECTED]
Sent: Monday, December 30, 2002 6:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] How to INSERT after ebjPostCreate versus
ejbCreate


Rod,
If you are using Oracle as your DB, then you can mark your CMR fk 
columns
as DEFERRABLE INITIALLY DEFERRED.
Oracle will only check the non-null constraints at commit time. 
Shouldn't
be a problem for you.

Other DBs may have something similar.

Ciao,
Jonathan




Rod Macpherson [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
21.12.2002 19:53
Please respond to jboss-user


To: [EMAIL PROTECTED]
cc:
Subject:[JBoss-user] How to INSERT after
ebjPostCreate versus ejbCreate


Calling an entity bean CMR setter method within ejbCreate is 
prohibited.
The
general solution is to make CMP calls within ejbCreate and CMR calls 
in
ejbPostCreate. That solution does not work when the CMR field maps
directly
to a non-nullable required column value. WebLogic resolves this issue 
by
deferring INSERT statements. How does one specify that option in 
JBoss?





---
This SF.NET email is sponsored by: Order your Holiday Geek Presents 
Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated 
Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M   http://www.thinkgeek.com/sf/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





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



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




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



Re: [JBoss-user] Re: jboss and vi ( Re: [JBoss-dev] NEED YOUR HELP!

2002-12-13 Thread Dain Sundstrom
Code completion is over rated, but there is a faq somewhere on the net 
somewhere that shows how to set it up with vim.

-dain

On Friday, December 13, 2002, at 03:28 PM, Joao Pedro Clemente wrote:



And the two largest ones:-))

jboss and emacs/jdee/xdoclet

jboss and vi


Yep, I would like to see that one:
Howto use vi with code completion :-)



---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] EJB Commit Option A Cache Question

2002-12-11 Thread Dain Sundstrom

On Wednesday, December 11, 2002, at 03:30 AM, Sacha Labourey wrote:




I think it's normal for JBoss to continue to issue queries for the 
pks,
after which it uses the associated cache data.

Why do you think that? The commit option A says that the cache is 
always in
synch with the DB. Consequently, it should first try to find the 
entity in
cache. If it is in cache, there is no need to issue a db query. If it 
is not
in cache, then a query is necessary.

Actually, JBoss always checks the cache to see if the bean is present 
for all commit options.  In A it works as described before.  In B, some 
beans may be in the cache but invalid and only the valid ones are used 
(i.e. ones in the current transaction), and in C only beans in the 
current transaction are in the cache.

-dain



---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Another Commit Option A Cache Question :)

2002-12-10 Thread Dain Sundstrom
CMP checks the cache before executing a findByPrimaryKey query.  If it 
is not checking the cache first it is a bug.  All other queries go 
directly to the database, because we don't have an in memory query 
engine.

-dain

On Tuesday, December 10, 2002, at 07:55 AM, Sacha Labourey wrote:

That is really really strange and should be changed IMO. Dain, is that 
a
side effect of another behaviour or is that really the wanted 
behaviour. I
suspect that this behaviour is inherited from the single-pk finders
behaviour that must go to the db anyway.

Is that also the case when you simply have a proxy to a given entity? 
Will
this generate a DB access or will it use the one from cache directly?

Cheers,


sacha

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]De la part de
Meyer-Willner, Bernhard
Envoyé : mardi, 10 décembre 2002 14:47
À : '[EMAIL PROTECTED]'
Objet : AW: [JBoss-user] Another Commit Option A Cache Question :)


JBoss 3.x is doing the same, that is doing a SELECT COUNT before
the actual
SELECT for findByPrimaryKey.

My question also is: is this intended behavior?

-Ursprüngliche Nachricht-
Von: Lennart Petersson [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. Dezember 2002 14:11
An: [EMAIL PROTECTED]
Betreff: [JBoss-user] Another Commit Option A Cache Question :)


JBoss 2.4.x

Why does findByPrimaryKey() always result in a 'select
count()'-query on the database? Is it really needed due to the 
spec?

I mean, I've told the app server (by using commit option A) that no 
one
else but the app server is touching the database. So... if the app
server has an entity with say the primary key xyz and I'm doing a
findByPrimaryKey(xyz) then the app server should be able to look in
cache __first__ to see if it is there. If it is it also must be in
database (since commit option A). If it is not in cache, then execute
the exists-query against database and the normal stuff...

I've just enlighten a couple of java developers to use the
findByPrimaryKey() __as_much_as_possible__ to avoid db-access to start
using the cache at max. They where often using other findByXXX's
querying on non-pk but still unique fields. And then they tested it 
and
asked me - 'why is it still doing all those select count() stuff?'. 
And
I didn't actually know what to say...

Am I wrong? Or perhaps this is handled different in JBoss 3 serie
(actually don't tested it - shame on me)?

/Lennart



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

This e-mail and any attachment is for authorised use by the
intended recipient(s) only.  It may contain proprietary material,
confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any
other party.  If you are not an intended recipient then please
promptly delete this e-mail and any attachment and all copies and
inform the sender.  Thank you.


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




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



Re: [JBoss-user] Testing EJB's

2002-12-10 Thread Dain Sundstrom
Jim,

How do you think we test JBoss?  Take a look at the CMP tests in the 
testsuite.  We have an addon to JUnit that can deploy and undeploy 
applications.  Also we have a tool that can run the tests on the server 
side like (I wrote this to test local interfaces), but does not require 
a servlet tier.

-dain


On Tuesday, December 10, 2002, at 02:23 PM, Jim Crossley wrote:

These are good points, and I appreciate yours and others' prompt 
replies.  However, the solutions presented so far seem to force me to 
complicate my object model to facilitate testing.

I agree that an app that is difficult to test probably suffers from 
poor design, but web apps by their very nature are difficult to test.

The app I'm currently working on is very CRUD-ish; it does simple 
read/write maintenance on a bunch of related objects.  I don't want 
the web tier to access the Entity beans directly -- this would violate 
the transactional requirements -- so they go through a Session Facade. 
Creating additional POJO's through which the session beans interact 
with the entities only adds an unnecessary layer of complexity IMHO.

The app is currently implemented using OJB, and I'm interested in 
refactoring it to use CMP EJB's, which IMHO are much easier to create 
and maintain (with Xdoclet, of course) than OJB.

The big benefit of using OJB, however, is that a user can easily test 
the entire app from end-to-end without deploying or even interacting 
with an external resource.  This is possible with Hypersonic's 
in-memory database.  It got me thinking that an in-memory EJB 
container would be just as cool.

JBoss is architected so well that I figured there must be a way to do 
it.  I'm currently trying to add enough stuff to the minimal 
configuration to support the deployment of EJB's, and then I'll see if 
it's not possible to invoke that configuration from the setup of my 
JUnit test runner.

Does anyone else think this is possible or even worth pursuing?

-- Jim

Demyanovich, Craig - Apogent wrote:
Jim,
I currently do not unit test either Entity or Session Beans.  Entity 
Beans
are trivial to write, and I trust that the application server will 
persist
them as advertised.  To unit test Session Beans would require that 
they be
deployed.  Since deployment complicates unit testing and complicated 
or
difficult unit tests suggest that the design could be done
differently/better, I design Session Beans to be controllers of a 
number of
collaborating objects.  These objects are simply business objects that
encode the business logic of the system.  Since they are plain Java 
classes,
I can unit test them very easily.
Consider a message-driven bean.  As I generally design them, MDBs 
receive a
message, hand it to a parser, hand the results of parsing to other 
objects
that do something with the message contents, hand the results of that 
work
to a communictator, which knows how to send the final results where 
they
need to go.  So, I don't test any part of the MDB; rather, I test the
various collaborating business objects.  If I'm confident that they 
all
behave as expected, I'm confident that they will also do so when they
interact via one another's interface.
Hope that helps,
Craig
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility Learn to use your power 
at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Re: Testing EJB's

2002-12-10 Thread Dain Sundstrom
The exact same thing has existed in JBoss for a long time and is called 
JUnitEJB...  I really think it should be converted to be an MBean 
instead, but that is another story.

-dain

On Tuesday, December 10, 2002, at 05:00 PM, SPam wrote:

Dain, your are right its a good approach to test EJB tier to have test 
run
inside the container.

Jim, There are interesting things in JBoss source, and there is also a
demoniac Junit extensions called ServerTestCase which uses as a custom 
test
runner a simple stateless (remote) EJB which runs your test case 
inside the
container and can be call like a standard junit test case ie thru 
jndi. You
still write only one classe for your TestCase, which will be both the 
test
case caller thru the JVM running your tests and the test itself called 
in
the TX of the stateless remote EJB.
(mmh, not that clear, but if u look in the internal details of JUnit, 
you'll
see how this approach is demoniac)

The distributed ServerTestCase is for weblogic (6), but very easy to 
adapt
for JBoss or any app server you want.
http://www.junit.org/news/extension/j2ee/index.htm#ServerTestCase

I just think you have to be carefull with TestSuite and setUp() 
tearDown()
usages.

S.Pam


Dain Sundstrom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Jim,

How do you think we test JBoss?  Take a look at the CMP tests in the
testsuite.  We have an addon to JUnit that can deploy and undeploy
applications.  Also we have a tool that can run the tests on the 
server
side like (I wrote this to test local interfaces), but does not 
require
a servlet tier.

-dain


On Tuesday, December 10, 2002, at 02:23 PM, Jim Crossley wrote:

These are good points, and I appreciate yours and others' prompt
replies.  However, the solutions presented so far seem to force me to
complicate my object model to facilitate testing.

I agree that an app that is difficult to test probably suffers from
poor design, but web apps by their very nature are difficult to test.

The app I'm currently working on is very CRUD-ish; it does simple
read/write maintenance on a bunch of related objects.  I don't want
the web tier to access the Entity beans directly -- this would 
violate
the transactional requirements -- so they go through a Session 
Facade.
Creating additional POJO's through which the session beans interact
with the entities only adds an unnecessary layer of complexity IMHO.

The app is currently implemented using OJB, and I'm interested in
refactoring it to use CMP EJB's, which IMHO are much easier to create
and maintain (with Xdoclet, of course) than OJB.

The big benefit of using OJB, however, is that a user can easily test
the entire app from end-to-end without deploying or even interacting
with an external resource.  This is possible with Hypersonic's
in-memory database.  It got me thinking that an in-memory EJB
container would be just as cool.

JBoss is architected so well that I figured there must be a way to do
it.  I'm currently trying to add enough stuff to the minimal
configuration to support the deployment of EJB's, and then I'll see 
if
it's not possible to invoke that configuration from the setup of my
JUnit test runner.

Does anyone else think this is possible or even worth pursuing?

-- Jim

Demyanovich, Craig - Apogent wrote:
Jim,
I currently do not unit test either Entity or Session Beans.  Entity
Beans
are trivial to write, and I trust that the application server will
persist
them as advertised.  To unit test Session Beans would require that
they be
deployed.  Since deployment complicates unit testing and complicated
or
difficult unit tests suggest that the design could be done
differently/better, I design Session Beans to be controllers of a
number of
collaborating objects.  These objects are simply business objects 
that
encode the business logic of the system.  Since they are plain Java
classes,
I can unit test them very easily.
Consider a message-driven bean.  As I generally design them, MDBs
receive a
message, hand it to a parser, hand the results of parsing to other
objects
that do something with the message contents, hand the results of 
that
work
to a communictator, which knows how to send the final results where
they
need to go.  So, I don't test any part of the MDB; rather, I test 
the
various collaborating business objects.  If I'm confident that they
all
behave as expected, I'm confident that they will also do so when 
they
interact via one another's interface.
Hope that helps,
Craig
---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility Learn to use your power
at OSDN's High Per

Re: [JBoss-user] J2ee spec thoughts

2002-12-09 Thread Dain Sundstrom

On Monday, December 9, 2002, at 10:51 AM, David Ward wrote:


Bill Burke wrote:

Answer?
Because there is no way to propagate transaction and security 
contexts to
the spawned threads unless J2EE provided a thread creation API.
Bill


I was under the impression that transaction and security context 
propagation was done using java.lang.ThreadLocal - a nice way to have 
a variable available to all work done in a server request thread 
(without having to pass the same params to everyone), as long as the 
class holding the (ThreadLocal) variable lives in a common  ClassLoader.

Now, to address accessing it via spawned threads, wouldn't 
java.lang.InhertiableThreadLocal work for tx and sx propagation?  Take 
a look at the class description in javadoc.

The real problem I see is orchestrating a single, safe commit...  when?

Only one thread is allowed to be associated with a transaction at a 
time (it's in one of the specs), so which spawned thread gets the tx?

-dain



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


Re: [JBoss-user] J2ee spec thoughts

2002-12-09 Thread Dain Sundstrom
On Monday, December 9, 2002, at 12:08 PM, Dan Christopherson wrote:


Dain Sundstrom wrote:
Ah, there's the rub! So my blithering about a hypothetical 
'asynchronous task' API needs to be amended again: tasks _must_ run in 
their own transaction!

Usually this is accomplished with a message queue.  You send a 'n' 
messages to a queue or queues, and wait for 'n' messages on a response 
queue.  It is legal to call receive, but you shouldn't use the version 
that blocks indefinitely.

-dain



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


Re: [JBoss-user] J2ee spec thoughts

2002-12-09 Thread Dain Sundstrom
On Monday, December 9, 2002, at 12:34 PM, David Ward wrote:


I guess my fundamental question is, is it a transaction that has a 
reference to a thread (which seems pretty limited - probably for good 
reasons initially), or is it the thead that carries the reference to 
the transaction (context)?  If it's the later, that's when I suggested 
that InheritableThreadLocal could come into service.  Each spawned 
thread could still access the tx from the InheritableThreadLocal.  If 
it's the prior, then I'll have learned something and retract with my 
tail between my legs - no problem.

I think you would have a very difficult time building a transaction 
manager that could allow multiple threads in a single transaction.  
Just to start with, you would have a huge problem with serialized 
isolation.  Then you would have a big problem with connectors as 
everyone assumes you only have one thread in a tx at a time (this is a 
huge step forward from the days when you could only have a single 
thread per tx and it always had to be the same one... old junk).

Anything is possible, but is it worth it, when you can get 95% of the 
need from a JMS queue and new transactions?

-dain



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


Re: [JBoss-user] J2ee spec thoughts

2002-12-09 Thread Dain Sundstrom

On Monday, December 9, 2002, at 01:26 PM, David Jencks wrote:


Ole suggested sending the prepare and commit messages from the  tx 
manager
all at once in different threads.  I don't think the tx manager would 
have
a problem supporting this (lots of threads doing work in a tx), it's 
the
consistency...

If you threat the additional new threads as a separate xa resource with 
new connections, the 2pc stuff should work.  This would mean that the 
new threads would be isolated from the parent and each other.  This is 
sort of like having multiple servers in a distributed transaction.  Did 
you follow my stream of conscience?

-dain



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


Re: [JBoss-user] custom function extensions to EJB-QL?

2002-12-03 Thread Dain Sundstrom
No.  I'm considering adding it in 4.0.  I am thinking something like 
this.

stringFunction(name, arg1, arg2, ..., argN)

There would be a function wrapper for each EJB-QL type.  This would 
allow new functions to easily plug in to the strongly typed EJB-QL.  
Again, I'm just considering this.

-dain

On Tuesday, December 3, 2002, at 03:37 AM, Matthew Hixson wrote:

Does JBoss support defining custom functions that map to functions 
defined in the database for extending EJB-QL?
  Thanks,
   -M@



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power  Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] custom function extensions to EJB-QL?

2002-12-03 Thread Dain Sundstrom
No, it is in the for pay docs... but the list is short.  In addition to 
the EJB-QL (2.0 spec) standard functions we support LCASE and UCASE.

-dain

On Tuesday, December 3, 2002, at 12:32 PM, Matthew Hixson wrote:

Is there a list online of all of the EJB-QL functions that are already 
built into JBoss?
  Thanks,
   -M@

On Tuesday, December 3, 2002, at 09:22 AM, Dain Sundstrom wrote:

No.  I'm considering adding it in 4.0.  I am thinking something like 
this.

stringFunction(name, arg1, arg2, ..., argN)

There would be a function wrapper for each EJB-QL type.  This would 
allow new functions to easily plug in to the strongly typed EJB-QL.  
Again, I'm just considering this.

-dain

On Tuesday, December 3, 2002, at 03:37 AM, Matthew Hixson wrote:

Does JBoss support defining custom functions that map to functions 
defined in the database for extending EJB-QL?
  Thanks,
   -M@



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power  Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your productivity. 
Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your productivity. 
Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] custom function extensions to EJB-QL?

2002-12-03 Thread Dain Sundstrom
Yes, but your code has to be aware of the abstract schema database 
mapping, which is kind of like hand coding security checks into your 
code; you can do it but you want to avoid it if you can.

-dain

On Tuesday, December 3, 2002, at 03:48 PM, Glenn Lewis wrote:


Though it can be done without EJB-QL ... at the moment we call a 
database function from a standard SQL call.

--
Glenn

Dain Sundstrom wrote:
No.  I'm considering adding it in 4.0.  I am thinking something like 
this.
stringFunction(name, arg1, arg2, ..., argN)
There would be a function wrapper for each EJB-QL type.  This would 
allow new functions to easily plug in to the strongly typed EJB-QL.  
Again, I'm just considering this.
-dain
On Tuesday, December 3, 2002, at 03:37 AM, Matthew Hixson wrote:
Does JBoss support defining custom functions that map to functions 
defined in the database for extending EJB-QL?
  Thanks,
   -M@



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power  Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your productivity. 
Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your productivity. 
Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] sotring a cmr result set

2002-11-27 Thread Dain Sundstrom
Not that I am aware of.

-dain

On Wednesday, November 27, 2002, at 01:06 AM, kiuma wrote:


Hello,
is there any possibility to sort a cmr collection without putting the 
result in a SortedSet?
regards,
kiuma



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power  Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR/CMP Primary-key/Foreign Key Question

2002-11-26 Thread Dain Sundstrom
I think Alex has this working in 4.0, but I don't think it is 
documented yet.

-dain

On Tuesday, November 26, 2002, at 01:15 PM, Eric Klimas wrote:

Hi all,

I'm trying write entity beans in Jboss 3.0.4 that have a CMR as part of
the primary key.  Is this even possible with EJB (I'd hope so).
Basically I have the following tables/objects

Tables:
Account:
  accountNum:number
  various other account fields, etc
  pk: accountNum

Userids:
  accountNum:number
  userid:String
  startdate:date
  other info about system userids
  pk: accountNum, userid, startdate
  fk: accountNum that refs Account table

The relationship is 1-M (accounts-userids) in case you haven't guessed,
so I used xdoclet to build the relationship between the two and I put 
an
@ejb:pk-field tag on the relationship methods but that doesn't seem to
work in looking at the generated code.

I also tried at one point to have accountNum on my UserEJB be a
persisted field and tried to have a relation at the same time, but that
didn't work for some reason either (can't remember what it was at this
point)

So my question is, is this possible in CMP 2.0, and if so, can somebody
give me some pointers/advice.

Thanks,
  Eric



---
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power  Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-15 Thread Dain Sundstrom
What you have described is almost all available now.  You can execute 
any JBossQL at runtime using DynamicQL.  To make it available to any 
code, just add a home method to some bean the calls an internal 
ejbSelect method that is mapped to DynamicQL.

What this doesn't get you is the ability to query across applications. 
I also don't know what you mean by standard JDBC functionality.

-dain

Pete Beck wrote:
Would this allow JBossQL be used in an ad-hoc manner?  So you could use
it in a very similar way to JDBC, but in the EJB domain rather than the
database domain?

A simple solution might be to have a JBossQL - Native SQL convertor, so
you can use the standard JDBC functionality provided by your database,
but write your queries in JBossQL.  I expect this functionality must
already exist somewhere.

On Tue, 2002-11-12 at 19:10, Dain Sundstrom wrote:


Pete,

To better support complex reporting we just need to add more features to 
JBossQL select statements (e.g., group by, having, sub queries, and 
multiple fields in the select clause).  I plan on adding most of these 
features.  It would be cool if sun added this stuff, but I find it 
incredibly unlikely.

What Michael is proposing is adding INSERT, UPDATE, and DELETE 
statements to JBossQL.  This is a very cool idea and I hope he spends 
some time designing a grammar.  Once we have a grammar the 
implementation should be fairly easy.

-dain





--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] DELETE UPDATE JBossQL

2002-11-15 Thread Dain Sundstrom
Wow that is even simpler then I thought.  I bet this could be 
implemented in a day for commit option B and C.   This is basically an 
out of band update, because we don't know which exact beans will be 
changed without evaluating the where clause.  For commit option A, we 
could run the query as a select and then flush the entities changed, or 
we could just flush the entire cache.  When we have database 
notifications working we can rely on them for option A.

Anyway, does anyone want to do this?

-dain

[EMAIL PROTECTED] wrote:
What Michael is proposing is adding INSERT, UPDATE, and DELETE 
statements to JBossQL.  This is a very cool idea and I hope he spends 
some time designing a grammar.  Once we have a grammar the 
implementation should be fairly easy.



Currently defined queries in JbossQL take the form

SELECT OBJECT(variable) 
FROM abstractSchemaName [AS] variable 
[WHERE value comparison value] [WHERE value [ASC | DESC]]

JBossQL := select_clause from_clause [where_clause] [order_by_clause]
order_by_clause := ORDER BY order_by_path_expression
  ( , order_by_path_expression)*
order_by_path_expression := ( numeric_valued_path |
  string_valued_path |
  datetime_valued_path ) [ASC | DESC]
E.G.
ejb-ql
  ![CDATA[
SELECT OBJECT(theTodaysAction) FROM TodaysAction AS theTodaysAction
  WHERE theTodaysAction.position = ?1
  ]]
/ejb-ql


If I understand it correctly what is being asked for is to add the following to jboss-ql, delete and update queries in sql that update the cached data held in the appserver, so if some one is using commit-option A the cache will be updating. Thus allowing simple bulk updates to occur safely and quickly, rather than having to iterate through each entity changing a value or deleting entities that meet a simple criteria. In its most basic form it appears to be a ‘make change in database then refresh cache for changed entities’ command. I am still not clear what format insert would take.
I offer the following for general criticism and amusement of the list.

DELETE

DELETE OBJECT(variable) 
FROM abstractSchemaName [AS] variable 
[WHERE value comparison value]

delete_clause from_clause [where_clause]

E.G
ejb-ql
  ![CDATA[
DELETE OBJECT(theTodaysAction) FROM TodaysAction AS theTodaysAction 
  WHERE theTodaysAction.position = ?1
  ]]
/ejb-ql


UPDATE 

UPDATE OBJECT(variable) 
FROM abstractSchemaName [AS] variable 
SET value = value
[WHERE value comparison value]

update_clause from_clause set_clause [where_clause]

E.G.
ejb-ql
  ![CDATA[
UPDATE OBJECT(theTodaysAction)
FROM TodaysAction AS theTodaysAction
SET theTodaysAction.description = ?2
  WHERE theTodaysAction.position  ?1
  ]]
/ejb-ql



INSERT ?



---
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-13 Thread Dain Sundstrom
Michael Bartmann wrote:

Dain,

I could help defining the grammar; unfortunately I'm
quite busy this week and on a long sought vacation
next week, so you'll have to be patient with me.


No rush; I won't be able to get to it for a while anyway.


The current grammar for JBossQL is not exactly tiny,
at least the JavaCC representation is a bit difficult
to read due to the way JavaCC grammars model nested
expressions.

But the things we will have to extend work on a higher
syntactical level mostly, as in

UPDATE SomeEntity SET SomeField=expression

which could use similar low level tokens as the existing
grammar when doing

SELECT ... WHERE SomeField=expression


Agreed


We'll also have to decide which features are to be supported;
One thing to think about is resultset postprocessing:
e.g. in the case of a container iterating over a
resultset it _could_ do some postprocessing if there is no
adequate sql equivalent of the eql query.

Example:

SELECT arcsinh(SomeField) ...

with a database not supporting that function. This smells
like jet-engine anyway; I would speak against such
postprocessing. One reason is my original wish
to support providing the generated sql to any SLSB,
and the session would simply pump it into a
jdbc driver without any knowledge about need for
postprocessing.

So are we speaking only of a transformation engine
mapping eql/jbossql to db specific sql, as would suffice
in the case of UPDATES, where there is no need to
postprocess anyway?


I have no plans to do any post processing.  I also don't have plans for 
a real query engine.  All I plan on writing my self is a cross compiler. 
 If someone wants to write it, that would be cool.

That leaves the problem of function support across all databases.  My 
current plan it to simply throw some sort of unsupported function 
exception when the query is compiled (deployment or at runtime for 
DynamicQL).

-dain



---
This sf.net email is sponsored by: Are you worried about 
your web server security? Click here for a FREE Thawte 
Apache SSL Guide and answer your Apache SSL security 
needs: http://www.gothawte.com/rd523.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help (intersection)

2002-11-13 Thread Dain Sundstrom
That shouldn't be to hard once we add support for sub queries, but 
unless it is supported by most of the major vendors (postgres, oracle, 
ms, ibm), it wouldn't be worth the work.

-dain

[EMAIL PROTECTED] wrote:
On Tue, Nov 12, 2002 at 04:53:28PM -0600, Dain Sundstrom wrote:


What is an INTERSECTION query?



From postgresql-help:


Syntax:
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
* | expression [ AS output_name ] [, ...]
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY expression [, ...] ]
[ HAVING condition [, ...] ]
***[ { UNION | INTERSECT | EXCEPT [ ALL ] } select ] ***
[ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ]
[ FOR UPDATE [ OF tablename [, ...] ] ]
[ LIMIT { count | ALL } [ { OFFSET | , } start ]]

I think it is used like:
SELECT personID from persondata where datatype=1 AND value=ln1
INTERSECT
SELECT personID from persondata where datatype=2 AND value=ln2

finds the persons registered with ln1 as datatype 1 and ln2 as datatype 2.

I think the obvious solution SELECT personID from persondata where (datatype=1 AND value=ln1) AND (datatype=2 AND value=ln2) doesn't work, as it compares one and one row. 

In this table, personID isn't unique.


Is it widely supported?


I suppose so in the major DBs, if it isn't a simpler solution to this problem (using just one SQL statement).

In addition UNION and EXCEPT should be implemented (if these are not possible to work around).




---
This sf.net email is sponsored by: Are you worried about 
your web server security? Click here for a FREE Thawte 
Apache SSL Guide and answer your Apache SSL security 
needs: http://www.gothawte.com/rd523.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-12 Thread Dain Sundstrom
Pete,

To better support complex reporting we just need to add more features to 
JBossQL select statements (e.g., group by, having, sub queries, and 
multiple fields in the select clause).  I plan on adding most of these 
features.  It would be cool if sun added this stuff, but I find it 
incredibly unlikely.

What Michael is proposing is adding INSERT, UPDATE, and DELETE 
statements to JBossQL.  This is a very cool idea and I hope he spends 
some time designing a grammar.  Once we have a grammar the 
implementation should be fairly easy.

-dain

Pete Beck wrote:
Even better would be if Sun added something to the spec.
It seems to me that this is a fundamental limitation of CMP 2.  No
matter how fast the container, it is difficult to see how it would ever
be able to do complex reports using CMP without such a feature.
Some reports may only return a few records, but might require millions
of database records to be processed first.

On Fri, 2002-11-08 at 17:08, Dain Sundstrom wrote:


That is a super cool idea.  This could easily fit into the 4.0 
architecture.  Do you want to work on proposing a grammar for insert, 
update, and delete?   Once we have a grammar the conversation to sql is 
simple, and we can easily throw in cache updating logic.





---
This sf.net email is sponsored by: 
To learn the basics of securing your web site with SSL, 
click here to get a FREE TRIAL of a Thawte Server Certificate: 
http://www.gothawte.com/rd522.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help (intersection)

2002-11-12 Thread Dain Sundstrom
What is an INTERSECTION query?  Is it widely supported?

-dain

Marius Kotsbak wrote:

What about adding INTERSECTION-queries (whis is possible in postgresql)?
Or is it possible by some easy workaround now?

On tir, 2002-11-12 at 20:10, Dain Sundstrom wrote:


Pete,

To better support complex reporting we just need to add more features to 
JBossQL select statements (e.g., group by, having, sub queries, and 
multiple fields in the select clause).  I plan on adding most of these 
features.  It would be cool if sun added this stuff, but I find it 
incredibly unlikely.

What Michael is proposing is adding INSERT, UPDATE, and DELETE 
statements to JBossQL.  This is a very cool idea and I hope he spends 
some time designing a grammar.  Once we have a grammar the 
implementation should be fairly easy.

-dain

Pete Beck wrote:

Even better would be if Sun added something to the spec.
It seems to me that this is a fundamental limitation of CMP 2.  No
matter how fast the container, it is difficult to see how it would ever
be able to do complex reports using CMP without such a feature.
Some reports may only return a few records, but might require millions
of database records to be processed first.

On Fri, 2002-11-08 at 17:08, Dain Sundstrom wrote:



That is a super cool idea.  This could easily fit into the 4.0 
architecture.  Do you want to work on proposing a grammar for insert, 
update, and delete?   Once we have a grammar the conversation to sql is 
simple, and we can easily throw in cache updating logic.




---
This sf.net email is sponsored by: 
To learn the basics of securing your web site with SSL, 
click here to get a FREE TRIAL of a Thawte Server Certificate: 
http://www.gothawte.com/rd522.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by: 
To learn the basics of securing your web site with SSL, 
click here to get a FREE TRIAL of a Thawte Server Certificate: 
http://www.gothawte.com/rd522.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: 
To learn the basics of securing your web site with SSL, 
click here to get a FREE TRIAL of a Thawte Server Certificate: 
http://www.gothawte.com/rd522.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR Performance: Weblogic7 Much Faster Then JBoss

2002-11-08 Thread Dain Sundstrom
Christian,

Thanks for spending the time on this.

-dain

Christian Riege wrote:

Peter,

there are lies, damn lies and benchmarks.

First of all, thanks for the supplied test and sources.

Second, I've run the tests on my machine (1GHz AMD, .5GB RAM, Linux
Kernel 2.4.18, JVM 1.4.0_02). I know that any comparisons to your
systems are probably apples and oranges (you're on a Windows box,
right?), but I'm getting significantly different numbers.

JBoss version is Branch_3_0 as per CVS 15 minutes ago:

[Server] JBoss (MX MicroKernel) [3.0.5RC1 Date:200211081043] Started in
0m:41s:32ms




14:31:46,328 INFO  [STDOUT] Initial Retrival, beans may or maynot be in
cache.
14:31:46,375 INFO  [STDOUT] finder took 47ms.
14:31:49,140 INFO  [STDOUT] External ValueObject creation took 2765ms
for 1000 objects.
14:31:49,859 INFO  [STDOUT] Internal ValueObject creation took 719ms for
1000 objects.
14:31:49,859 INFO  [STDOUT] Secondary Retrival, beans are in cache.
14:31:50,125 INFO  [STDOUT] finder took 266ms.
14:31:52,765 INFO  [STDOUT] External ValueObject creation took 2640ms
for 1000 objects.
14:31:53,437 INFO  [STDOUT] Internal ValueObject creation took 672ms for
1000 objects.



it's odd but it seems that you are not getting any significant
performance increase on the second run. my logfile states:

creating 1000 Blobs...
Creation complete, took 29046ms.
testing retrival speed...
Initial Retrival, beans may or maynot be in cache.
	finder took 265ms.
	External ValueObject creation took 4859ms for 1000 objects.
	Internal ValueObject creation took 1497ms for 1000 objects.
Secondary Retrival, beans are in cache.
 	finder took 1334ms.
 	External ValueObject creation took 2994ms for 1000 objects.
 	Internal ValueObject creation took 679ms for 1000 objects.

As you can see I have a significant performance increase between the
initial and the secondary retrieval.

Every time I call your Test program again afterwards (w/o restarting
JBoss), I'm getting roughly the figures of the Secondary Retrieval in
both cases which hints that the Entity Beans are retrieved from cache
rather than from the DB.

You _are_ running a vanilla 3.0.4 system w/ no changes to the
configuration files, aren't you?

I'll try to pipe this through OptimizeIt to see where JBoss spends its
time during the test. Unfortunately I don't have the time to get
WebLogic 7 up and running to get a good comparison vs. JBoss.

Best regards,
	Christian



---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] ejbCreate violating database 'NOT NULL' constraints(foreign keys)

2002-11-08 Thread Dain Sundstrom
There is a patch that supposedly fixes this, but I have not looked at it 
yet.

-dain

Alex Loubyansky wrote:
Hello Michael,

MAL How can I avoid violating NOT NULL constraints on foreign keys that are
MAL mapped to cmr-fields?

there is no way for now.

MAL I know that we're not suppose to set cmr fields during the ejbCreate method 
MAL of an entity bean.  However, it seems that the call to insert into is 
MAL executed before the cmr fields are set (ejbPostCreate).  Is there a way 
MAL around this?  I'd like to keep my database schema the way it is (with it's 
MAL relationship intact).




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-08 Thread Dain Sundstrom
That is a super cool idea.  This could easily fit into the 4.0 
architecture.  Do you want to work on proposing a grammar for insert, 
update, and delete?   Once we have a grammar the conversation to sql is 
simple, and we can easily throw in cache updating logic.

-dain

Michael Bartmann wrote:
Dain, please be patient with me, perhaps I simply don't know enough
of what is possible with cmp2.

Is there a way to let a SLSB perform a statement directly on the jdbc
datasource using _only_ eql?

So do something like: update SomeEntity set SomeField=5  where 
SomeOtherField=3
instead of:   update SomeTable  set SomeColumn=5 where 
SomeOtherColumn=3

With directly on the jdbc ds I mean that the result should be the same 
as if I did
invoke the equivalent sql through the jdbc driver. No bean cache 
affected, simply
transform eql to sql and feed it into a jdbc statement.

I am aware that update has no meaning for eql finders, but I hope you 
get the idea.

Regards,
Michael


Dain Sundstrom wrote:

Now I am completely confused.  What exactly do you want that you can't 
do today?

-dain

Michael Bartmann wrote:

Dain,

I'm a bit confused (especially by your phrase in memory query) and 
I don't know if you
misunderstood me (or Pete's original post) or I misunderstand you.

I'll try to make clear what I meant:

1) we have a jboss with cmp2 container and deployed entities, so this 
container
knows how to handle eql, transform it into sql and send it to the 
jdbc layer.
2a) if you do mass queries or updates and you decide that you want to 
circumvent
the container/cache/interceptors for performance reasons you are 
normally bound
to plain sql queries to the jdbc layer. So you are forced to 
circumvent the
tablename - entityname abstraction, the columnname - 
methodname
abstraction and must handle db specific sql dialects.
2b) if we had means to let the container translate eql to sql because 
it knows the
 relevant metadata, we could use it to feed it into jdbc, and 
only need to handle
 the ResultSet iteration programmatically. There is no such thing 
as in memor sql;
 we would use the normal oracle/hypersonic whatsoever db the 
container uses for
 is transactions.

You might argue that we should not need to use 2a or 2b anyway if 
make the container
really fast. And even readonly sql has to do transaction isolation 
right to not interfere
with the container and deadlock in the worst case.
But I must admit that we use plain sql in our application (which 
was developed under
jboss 2.4 first, which might count as an excuse). And loosing the eql 
abstraction is a
maintenance nightmare.

Just my 2cent,
Michael

Dain Sundstrom wrote:

Michael,

The idea for an in memory query engine is interesting, but this 
requires that all of you data to fit into memory and actually be in 
memory.  If you want to write it, that would be cool, but I think 
there are way more important things to make CMP fast.

-dain

Michael Bartmann wrote:

Comments inline,
Regards,
Michael

saroj kumar wrote:


Running EJB-QL without Container/EB

We need to consider few points.

1) If there is no container then how do we parse the XML?


As I understand the main usecase: We _have_ entities (tereby xml) 
and containers, but have
a way to circumvent the container in case of  queries, which would 
otherwise done
so in an inferiour fashion (pure sql).


2) If there are no Entity beans then how do you query?






We could have an mbean which has enough information from the 
container config
to convert eql to sql.


3) If Above points are sorted out then how do we achieve complex
joins/unions?


Good question; this is a shortcomming of eql (by design?).



4) Moreover, In case of large projects, describing the schema in 
XML may
require some tools
Otherwise, the sheer sixe of DB will prevent users.

Again, we only consider a way to prevent a mixture of entities and 
plain sql in the
application, so thing can only get better.


This becomes crucial if the changes to DB are quite frequent.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:jboss-user-admin;lists.sourceforge.net] On Behalf Of Michael
Bartmann
Sent: Wednesday, November 06, 2002 6:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help


Absolutely!

I don't have to add much to this, but I think that this request
(non-container ejb-ql) is so important (and a good workaround,
too), that I simply couldn't resist to reply.

Anyway, would this be difficult to achieve?

Regards,
Michael Bartmann


Pete Beck wrote:

 

On Tue, 2002-10-29 at 17:28, Bill Burke wrote:


 

JBoss is being used in production everywhere.  I've been at 6 sites







myself
 

over the past year.  IMHO and experience, entity beans are not the







right
 

choice if you're doing complex reporting.  A handmade query 
cache with
direct JDBC will always be faster.  Besides, EJB QL doesn't have 
Group

[JBoss-user] Off topic: Never use Expedia

2002-11-08 Thread Dain Sundstrom
I just thought I would warn everyone.  At the JBoss Group we do a lot of 
travel, and most of it we book through expedia.com.  Recently expedia 
changed their site to prepaid hotels.  They make that claim that they 
give you a special rate, but the rate is not special.  The problem is if 
you need to change your travel plans and leave early, they will not 
refund any un used days.  This only cost me $100, but it could have been 
more.  I talked with expedia and they refused to refund that $100 so I 
will never be using them again, and I suggest you don't.  The manager at 
the hotel I stayed at recommends hotels.com as it is easy to change 
reservations, and I will be checking them out next time.

Ok, I'm done ranting now.

-dain



---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Off topic: Never use Expedia

2002-11-08 Thread Dain Sundstrom
Ok maybe, I use a POTA (plain old travel agent).

-dain

Stephen Davidson wrote:

Greetings.

I can't tell you much about hotels.com, other than there head office is 
an Ex-Ericson building across the street from where I live, and that 
their HR and IT people are next to impossible to get a hold of...

-Steve

Dain Sundstrom wrote:

I just thought I would warn everyone.  At the JBoss Group we do a lot 
of travel, and most of it we book through expedia.com.  Recently 
expedia changed their site to prepaid hotels.  They make that claim 
that they give you a special rate, but the rate is not special.  The 
problem is if you need to change your travel plans and leave early, 
they will not refund any un used days.  This only cost me $100, but it 
could have been more.  I talked with expedia and they refused to 
refund that $100 so I will never be using them again, and I suggest 
you don't.  The manager at the hotel I stayed at recommends hotels.com 
as it is easy to change reservations, and I will be checking them out 
next time.

Ok, I'm done ranting now.

-dain



---
This sf.net email is sponsored by: See the NEW Palm Tungsten T 
handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR Performance: Weblogic7 Much Faster Then JBoss

2002-11-07 Thread Dain Sundstrom
You spent the time to build and run a test on two platforms, but you 
don't have the time to start OptimizeIt and figure out what it killing 
the performance of your application... Anyway, I'll get to looking at 
this sometime, but I'm a little busy now.

-dain

Luttrell, Peter wrote:
Over the last couple of weeks i started a couple threads about CMP 
performance in JBoss. Bill asked for comparison with what Weblogic can 
do, so i got my test case to work with it and the results speak for 
themselves.
 
 
-  Weblogic 7 is 330% to 715% faster then JBoss3.0.4 in the one test that 
I did. All code used is attached.
 
 
Output. Reference the other email threads for an overview of what I'm 
doing in the code and the confirmation that read-aheads are configured 
properly...or just look at the code/deployment descriptors.
 
JBoss3.0.4:
14:31:36,312 INFO  [STDOUT] creating 1000 Blobs...
14:31:43,968 INFO  [STDOUT] Creation complete, took 7656ms.
14:31:46,328 INFO  [STDOUT] testing retrival speed...
14:31:46,328 INFO  [STDOUT] Initial Retrival, beans may or maynot be in 
cache.
14:31:46,375 INFO  [STDOUT] finder took 47ms.
14:31:49,140 INFO  [STDOUT] External ValueObject creation took 
2765ms for 1000 objects.
14:31:49,859 INFO  [STDOUT] Internal ValueObject creation took 719ms 
for 1000 objects.
14:31:49,859 INFO  [STDOUT] Secondary Retrival, beans are in cache.
14:31:50,125 INFO  [STDOUT] finder took 266ms.
14:31:52,765 INFO  [STDOUT] External ValueObject creation took 
2640ms for 1000 objects.
14:31:53,437 INFO  [STDOUT] Internal ValueObject creation took 672ms 
for 1000 objects.
Note the 672 on the last line. With all of the object cached (which they 
will be), this is what would happen in production.
 
 
Weblogic7:
creating 1000 Blobs...
Creation complete, took 10297ms.
testing retrival speed...
Initial Retrival, beans may or maynot be in cache.
finder took 422ms.
External ValueObject creation took 8906ms for 1000 objects.
Internal ValueObject creation took 47ms for 1000 objects.
Secondary Retrival, beans are in cache.
finder took 235ms.
External ValueObject creation took 171ms for 1000 objects.
Internal ValueObject creation took 47ms for 1000 objects.
Note the 47ms on the last line. With all of the object cached (which 
they will be), this is what would happen in production. In other runs, 
i've seen this number as low as 31ms.
 
 
So for the findAll and get all data:
 
JBoss External ValueObject Creation: 266 + 2640 = 2906
JBoss Internal ValueObject Creation: 266 + 672 = 939
Weblogic External ValueObject Creation: 235 + 171 = 406 (715% faster)
Weblogic Internal ValueObject Creation: 235 + 47 = 282 (330% faster)
 
Side notes: With Weblogic i was going against Oracle vs Hypersonic in 
JBoss. This explains the difference in the initial reading in of the 
beans. But since both examples are 100% cached beans the db should not 
matter, except for the finder methods call to get all primary keys from db.
 
 
Closing Notes: I am a big JBoss fan. I would like these numbers to be 
totally wrong, or for me to have misconfigured JBoss in some way. If you 
can get JBoss to perform better then this, PLEASE tell us all how. All 
the code is attached.
 
.peter
 
as always ignore my company's crazy warning message below



This transmission contains information solely for intended recipient and 
may be privileged, confidential and/or otherwise protect from 
disclosure. If you are not the intended recipient, please contact the 
sender and delete all copies of this transmission. This message and/or 
the materials contained herein are not an offer to sell, or a 
solicitation of an offer to buy, any securities or other instruments. 
The information has been obtained or derived from sources believed by us 
to be reliable, but we do not represent that it is accurate or complete. 
Any opinions or estimates contained in this information constitute our 
judgment as of this date and are subject to change without notice. Any 
information you share with us will be used in the operation of our 
business, and we do not request and do not want any material, nonpublic 
information. Absent an express prior written agreement, we are not 
agreeing to treat any information confidentially and will use any and 
all information and reserve the right to publish or disclose any 
information you share with us.



--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-06 Thread Dain Sundstrom
Michael,

The idea for an in memory query engine is interesting, but this requires 
that all of you data to fit into memory and actually be in memory.  If 
you want to write it, that would be cool, but I think there are way more 
important things to make CMP fast.

-dain

Michael Bartmann wrote:
Comments inline,
Regards,
Michael

saroj kumar wrote:


Running EJB-QL without Container/EB

We need to consider few points.

1) If there is no container then how do we parse the XML?


As I understand the main usecase: We _have_ entities (tereby xml) and 
containers, but have
a way to circumvent the container in case of  queries, which would 
otherwise done
so in an inferiour fashion (pure sql).


2) If there are no Entity beans then how do you query?


We could have an mbean which has enough information from the container 
config
to convert eql to sql.


3) If Above points are sorted out then how do we achieve complex
joins/unions?


Good question; this is a shortcomming of eql (by design?).



4) Moreover, In case of large projects, describing the schema in XML may
require some tools
Otherwise, the sheer sixe of DB will prevent users.


Again, we only consider a way to prevent a mixture of entities and plain 
sql in the
application, so thing can only get better.


This becomes crucial if the changes to DB are quite frequent.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:jboss-user-admin;lists.sourceforge.net] On Behalf Of Michael
Bartmann
Sent: Wednesday, November 06, 2002 6:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help


Absolutely!

I don't have to add much to this, but I think that this request
(non-container ejb-ql) is so important (and a good workaround,
too), that I simply couldn't resist to reply.

Anyway, would this be difficult to achieve?

Regards,
Michael Bartmann


Pete Beck wrote:

 

On Tue, 2002-10-29 at 17:28, Bill Burke wrote:


  

JBoss is being used in production everywhere.  I've been at 6 sites



myself
 

over the past year.  IMHO and experience, entity beans are not the



right
 

choice if you're doing complex reporting.  A handmade query cache with
direct JDBC will always be faster.  Besides, EJB QL doesn't have Group



By.
 

 


Regarding Bill's comment about reporting; this is *so* true.  IMHO this
is one of the biggest problems that needs to be addressed in the EJB
spec.

However dropping to JDBC is not the answer either.  Unfortunately,
  

there
 

is currently little choice.

What is needed is the ability to run queries directly in EJB-QL.
  

Having
 

to use JDBC means your application is dependent on the database domain.
In other words, the application designer has to know about the
implementation specifics of the persistence layer (database).
Being able to execute queries in EJB-QL would allow us to use bean
  

names
 

and property names.


  





---
This sf.net email is sponsored by: See the NEW Palm Tungsten T 
handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

 



**Disclaimer**

Information contained in this E-MAIL being proprietary to Wipro 
Limited is 'privileged' and 'confidential' and intended for use only 
by the individual or entity to which it is addressed. You are notified 
that any use, copying or dissemination of the information contained in 
the E-MAIL in any manner whatsoever is strictly prohibited.

 




 





---
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. 
Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] iterator extremely slow problem

2002-11-06 Thread Dain Sundstrom
Are you trying to say that you iterate over all of the cmr's in the 
iterate.  If you are, there is little that can be done.  The current 
read ahead code does not support reading ahead across relationships 
on-find in response to a query.  I suggest you try OptimizeIt to make 
sure, but I would guess that you are getting 5 queries per loop.

-dain

Gene Ge wrote:
iterator extremely slow problem

Because I found my search was very slow, so I made a simple test:

code:* 


..

System.out.println(before findAll. time is+new Date().getTime());

  Iterator graduates=graduateHome.findAll().iterator();

System.out.println(after findAll. time is+new Date().getTime()+   
size=+graduateHome.findAll().size());

  long interval=0;
  long oldtime=0;

System.out.println(begin while. time is+new Date().getTime());

  while(graduates.hasNext()){
  graduate=(GraduateLocal) graduates.next();
   interval=new Date().getTime()-oldtime;
   oldtime=new Date().getTime();
System.out.println(in while. interval is+interval);
System.out.println(graduate is +graduate.getStudent().getName());
  }
System.out.println(after while. time is+new Date().getTime());


code 
end** 


the output 
is:
18:12:43,625 INFO  [STDOUT] before findAll. time is1036577563625
18:12:44,406 INFO  [STDOUT] after findAll. time is1036577563968   
size=1804
18:12:44,421 INFO  [STDOUT] begin while. time is1036577564421
18:12:44,421 INFO  [STDOUT] in while. interval is1036577564421
18:12:50,562 INFO  [STDOUT] graduate is ¸ðéª
18:12:50,562 INFO  [STDOUT] in while. interval is6141
18:12:56,343 INFO  [STDOUT] graduate is ¸ß  Óî
18:12:56,343 INFO  [STDOUT] in while. interval is5781
18:13:02,484 INFO  [STDOUT] graduate is ÁõÀöÁ¦
18:13:02,484 INFO  [STDOUT] in while. interval is6141
18:13:08,328 INFO  [STDOUT] graduate is Íõ  ά
18:13:08,328 INFO  [STDOUT] in while. interval is5844
18:13:14,437 INFO  [STDOUT] graduate is Àî¾´·å
18:13:14,437 INFO  [STDOUT] in while. interval is6109
18:13:20,171 INFO  [STDOUT] graduate is Àî  Óñ
18:13:20,171 INFO  [STDOUT] in while. interval is5734
18:13:26,187 INFO  [STDOUT] graduate is Áõ  ½¡
18:13:26,218 INFO  [STDOUT] in while. interval is6047
18:13:32,000 INFO  [STDOUT] graduate is Ëï  µ¤
18:13:32,015 INFO  [STDOUT] in while. interval is5797
18:13:37,687 INFO  [STDOUT] graduate is ³Â  ÁÁ
18:13:37,703 INFO  [STDOUT] in while. interval is5688
..
...
** 


Graduate is a CMP Bean with 5 attributes and 5 CMRs map table includes 
about 18000 rows use Microsoft SQLServer JDBC Driver. Connection 
properties has selectMethod=cursor.
the CMT type is Supports
this test is invoked in a struts Action without any transaction.

So, how can I deal with it?
any help is appreciated.

Gene

_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



---
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. 
Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)

2002-11-06 Thread Dain Sundstrom
] Secondary Retrival, beans are in cache.
14:31:50,125 INFO  [STDOUT] finder took 266ms.
14:31:52,765 INFO  [STDOUT] External ValueObject creation
took 2640ms for 1000 objects.
14:31:53,437 INFO  [STDOUT] Internal ValueObject creation
took 672ms for 1000 objects.
These results also beg the question of why the interceptor stack
takes so long to transversion, hense the extra 2000ms for 1000s
ejbs, but lets leave that for a seperate thread.
 
.peter
 
as always ignore my companies crazy warning message below
 
 
 



This transmission contains information solely for intended
recipient and may be privileged, confidential and/or otherwise
protect from disclosure. If you are not the intended recipient,
please contact the sender and delete all copies of this
transmission. This message and/or the materials contained herein
are not an offer to sell, or a solicitation of an offer to buy,
any securities or other instruments. The information has been
obtained or derived from sources believed by us to be reliable,
but we do not represent that it is accurate or complete. Any
opinions or estimates contained in this information constitute
our judgment as of this date and are subject to change without
notice. Any information you share with us will be used in the
operation of our business, and we do not request and do not want
any material, nonpublic information. Absent an express prior
written agreement, we are not agreeing to treat any information
confidentially and will use any and all information and reserve
the right to publish or disclose any information you share with us.




This transmission contains information solely for intended recipient and 
may be privileged, confidential and/or otherwise protect from 
disclosure. If you are not the intended recipient, please contact the 
sender and delete all copies of this transmission. This message and/or 
the materials contained herein are not an offer to sell, or a 
solicitation of an offer to buy, any securities or other instruments. 
The information has been obtained or derived from sources believed by us 
to be reliable, but we do not represent that it is accurate or complete. 
Any opinions or estimates contained in this information constitute our 
judgment as of this date and are subject to change without notice. Any 
information you share with us will be used in the operation of our 
business, and we do not request and do not want any material, nonpublic 
information. Absent an express prior written agreement, we are not 
agreeing to treat any information confidentially and will use any and 
all information and reserve the right to publish or disclose any 
information you share with us.



--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-06 Thread Dain Sundstrom
Now I am completely confused.  What exactly do you want that you can't 
do today?

-dain

Michael Bartmann wrote:
Dain,

I'm a bit confused (especially by your phrase in memory query) and I 
don't know if you
misunderstood me (or Pete's original post) or I misunderstand you.

I'll try to make clear what I meant:

1) we have a jboss with cmp2 container and deployed entities, so this 
container
knows how to handle eql, transform it into sql and send it to the 
jdbc layer.
2a) if you do mass queries or updates and you decide that you want to 
circumvent
the container/cache/interceptors for performance reasons you are 
normally bound
to plain sql queries to the jdbc layer. So you are forced to 
circumvent the
tablename - entityname abstraction, the columnname - 
methodname
abstraction and must handle db specific sql dialects.
2b) if we had means to let the container translate eql to sql because it 
knows the
 relevant metadata, we could use it to feed it into jdbc, and only 
need to handle
 the ResultSet iteration programmatically. There is no such thing as 
in memor sql;
 we would use the normal oracle/hypersonic whatsoever db the 
container uses for
 is transactions.

You might argue that we should not need to use 2a or 2b anyway if make 
the container
really fast. And even readonly sql has to do transaction isolation right 
to not interfere
with the container and deadlock in the worst case.
But I must admit that we use plain sql in our application (which was 
developed under
jboss 2.4 first, which might count as an excuse). And loosing the eql 
abstraction is a
maintenance nightmare.

Just my 2cent,
Michael

Dain Sundstrom wrote:

Michael,

The idea for an in memory query engine is interesting, but this 
requires that all of you data to fit into memory and actually be in 
memory.  If you want to write it, that would be cool, but I think 
there are way more important things to make CMP fast.

-dain

Michael Bartmann wrote:

Comments inline,
Regards,
Michael

saroj kumar wrote:


Running EJB-QL without Container/EB

We need to consider few points.

1) If there is no container then how do we parse the XML?


As I understand the main usecase: We _have_ entities (tereby xml) and 
containers, but have
a way to circumvent the container in case of  queries, which would 
otherwise done
so in an inferiour fashion (pure sql).


2) If there are no Entity beans then how do you query?




We could have an mbean which has enough information from the 
container config
to convert eql to sql.


3) If Above points are sorted out then how do we achieve complex
joins/unions?


Good question; this is a shortcomming of eql (by design?).



4) Moreover, In case of large projects, describing the schema in XML 
may
require some tools
Otherwise, the sheer sixe of DB will prevent users.

Again, we only consider a way to prevent a mixture of entities and 
plain sql in the
application, so thing can only get better.


This becomes crucial if the changes to DB are quite frequent.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:jboss-user-admin;lists.sourceforge.net] On Behalf Of Michael
Bartmann
Sent: Wednesday, November 06, 2002 6:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help


Absolutely!

I don't have to add much to this, but I think that this request
(non-container ejb-ql) is so important (and a good workaround,
too), that I simply couldn't resist to reply.

Anyway, would this be difficult to achieve?

Regards,
Michael Bartmann


Pete Beck wrote:

 

On Tue, 2002-10-29 at 17:28, Bill Burke wrote:


 

JBoss is being used in production everywhere.  I've been at 6 sites





myself
 

over the past year.  IMHO and experience, entity beans are not the





right
 

choice if you're doing complex reporting.  A handmade query cache 
with
direct JDBC will always be faster.  Besides, EJB QL doesn't have 
Group





By.
 

 




Regarding Bill's comment about reporting; this is *so* true.  IMHO 
this
is one of the biggest problems that needs to be addressed in the EJB
spec.

However dropping to JDBC is not the answer either.  Unfortunately,
  



there
 

is currently little choice.

What is needed is the ability to run queries directly in EJB-QL.
  



Having
 

to use JDBC means your application is dependent on the database 
domain.
In other words, the application designer has to know about the
implementation specifics of the persistence layer (database).
Being able to execute queries in EJB-QL would allow us to use bean
  



names
 

and property names.


  







---
This sf.net email is sponsored by: See the NEW Palm Tungsten T 
handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)

2002-11-06 Thread Dain Sundstrom
Well, it should be fast then.  Now is when you fire up OptimizeIt and 
findout what part of my code is wasting all that time.

-dain

Luttrell, Peter wrote:
No i did not see that email.

I am using commit option A. The first time that I run through all beans, the
main ones as well as the relationship ones should all get cached, right?

If this is correct then my question stands because the times that i posted
were the 4th read. 

Please see the code that I posted with the original message. I think you
might have been the one who asked for the sample.

.peter

-Original Message-
From: Dain Sundstrom [mailto:dain;daingroup.com]
Sent: Wednesday, November 06, 2002 5:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance
Tuni ng Help)


Did you miss my email?  It is slow because there is no way to readahead 
across a cmr on-find in response to a query.  This will eventually be 
in, but it is not not, so you get a query for each cmr you load.  If you 
use commit option A all data will be eventually be cached so it will be 
fast.  In future release the readahead will be more flexible.

-dain

Luttrell, Peter wrote:

Changing the readahead strategy should not change the results i've 
posted, as i run though the beans once, hense they are loaded.

So back to the questions: Is it acceptable that adding 2 cmrs takes 450% 
the time

   -Original Message-
   From: Herve Tchepannou [mailto:htchepannou;objexis.com]
   Sent: Tuesday, November 05, 2002 3:38 PM
   To: [EMAIL PROTECTED]
   Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean
   Performance Tuni ng Help)

   1. What's the read-ahead/strategy of findAll() ? Since you want to
   get all the beans value object, it should be set to on-find,
   otherwhise, you are going to have the N+1 finder problem
   2. Since you're populating the ValueObject with the content of your
   CMR fields, because each access to the CMR fields will call their
   findByPrimaryKey() to load them. Me, I always load CMR when needed.
   If they are always needed, then I use de Dependant  Value Class
   3. Internal/External ValueObject creation. This make sense because
   in the external, each call of a getter from the ValueObject passes
   via the beanProxy (+ interceptors), where in the internal case you
   are already in the bean, then no overhead of the beanProxy
   4. It may be interesting to see the result if you load all the 1000
   beans, but return just a page of 25 ValueObjects, which is how most
   web-pages works to avoid those performance problems - then, make
   sure that the read-ahead strategy of the findAll() is set to on-load

   -Original Message-
   From: Luttrell, Peter [mailto:PLuttrell;starkinvestments.com]
   Sent: Tuesday, November 05, 2002 4:00 PM
   To: '[EMAIL PROTECTED]'
   Subject: [JBoss-user] CMRs are Slow (was: Entity Bean Performance
   Tuning Help)

   The Entity Bean Performance Tuning Help thread went off in
   various different directions. The thread begged a sample and a
   little more detail as to what was slow. I've identified the
   problem to be (CMRs) and provided a full sample (attached).

   Lets rehash what i'm testing:

   The code runs inside of a SSB with a transaction on each
   method vs servlet (struts action) + manual transaction as in the
   real app. I use hypersonic vs oracle in my real app.
  
   calls findAll()
   dumps out the time

   iterates through each calling all methods and building a
   valueobject.
   this should cache all results (checkout my jboss.xml)

   iterates through each calling all methods and building a
   valueobject (a 2nd time)
   dumps out the time
  
   iterates through each and calling 1 method on ejb, which
   builds the valueobject internally
   dumps out the time

   I'm mostly concerned with the last time, as it's what i do in my
   real case...because it's the fastest.

   The entitybean has 2 CMRs. The read-all+fields time for 1000
   cached beans using internal valueobject generation takes about
   670ms. But with 1 cmr it only takes 350ms. And with No cmrs it
   only takes 150ms. [if you want slightly modified code, let me
   know].

   Now 150ms is great! But 350 isn't. It's more then double. Is
   this acceptable? Add a few more and it's unusable for a lot of
   applications.

   Arguably cmp EntityBeans were worthless till ejb2.0 and CMRs
   came along. But to actually use them in JBoss is suicide for
   performance.



   The attached sample has a test class called Test, which can be
   run with -c to generate 1000 test rows. Also included is an ant
   script which builds the test beans and deploys them to jboss

Re: [JBoss-user] character literal comparison in JBoss-QL

2002-11-06 Thread Dain Sundstrom
The jr.jrFundStatus field is obviously a number and therefore cannot be 
compared to a string literal. Either change the field to a String or 
change the query.

-dain

Rene Palad wrote:
I've been doing a:

 * @jboss:query signature=Collection
findFundStatusReservedByJbCode(java.lang.Integer
JB_CODE)
 * query=SELECT OBJECT(jr) FROM GlJournalBatch jb,
IN(jb.glJournals) jr WHERE jb.jbCode=?1 AND
jr.jrFundStatus='R'

and keep getting a:

org.jboss.deployment.DeploymentException: Error
compiling ejbql; - nested throwable:
(org.jboss.ejb.plugins.cmp.ejbql.ParseException:
Encountered \'R\' at line 1, column 103.
Was expecting one of:
ABS ...
LENGTH ...
LOCATE ...
SQRT ...
( ...
+ ...
- ...
INTEGER_LITERAL ...
FLOATING_POINT_LITERAL ...
NUMERIC_VALUED_PARAMETER ...
NUMERIC_VALUED_PATH ...
)

Is this not valid?  If it isn't valid how do you
workaround for this?

TIA,
Rene


---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Does CMR Collections have to be accessed (iterated) inside a transaction?

2002-11-05 Thread Dain Sundstrom
It is in the spec.  It would be easy to support iterating outside of the 
spec, but you would get an inconsistent database on a writeable database.

-dain

Herve Tchepannou wrote:
Is this a requirement of EJB standard or just due to JBoss implementation?

-Original Message-
From: julien viet [mailto:julien_viet;yahoo.fr]
Sent: Tuesday, November 05, 2002 6:16 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Does CMR Collections have to be accessed
(iterated) inside a transaction?


yes they have.

 --- Victor Batista
[EMAIL PROTECTED] a écrit :  Hello!
I am developing two entity beans which have a
  relatinship 1-N (One User can
  have Many Roles).
I have also a Facade session bean to handle the
  business operations. I have
  declared the Transaction property of my beans
  (Entity and session) as
  Supports. The methods which insert or update data
  are declared as
  Required. I don't want read-only operations to be
  executed inside
  transactions.
I have one method (getUser) which returns a VO with
  the User data and calls
  the relation method (getRoles() which returns a
  Collection of Roles). As
  this is a read operation, I don't want a transaction
  to handle this method.
  Although I am having one exception when I try to
  iterate the list of roles
  returned by the getRoles method
 
 
java.lang.IllegalStateException: A CMR collection
  may only be used within
  the transction in which it was created
 
 
Does CMR collections have to be accessed inside
  transactions?
 
Thanks in advance,
Victor Batista
 
 
 
 
 
 
---
  This sf.net email is sponsored by: See the NEW Palm
  Tungsten T handheld. Power  Color in a compact
  size!
 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
 
https://lists.sourceforge.net/lists/listinfo/jboss-user

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


---
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-04 Thread Dain Sundstrom
Luttrell, Peter wrote:

Bill also suggested that it was my code, which i don't think is the case. I
could be wrong ~ can anyone suggest how i can optimize this constructor:

public MyValueObject(SomeLocalInterface ejb){

	name = ejb.getName();
	id = ejb.getId();
	someOtherField = ejb.getSomeOtherField();
}

There are about 10 fields or so. I did double check and realize that one of
them is a field on a relationship, which may be the source of the problem.


You are doing 10 invocations through the ejb layers.  The code will be 
way more efficient if you put the value object creation code inside the 
entity bean.  For example

public abstract class MyEntityBean extends EJBObject {
   public MyValueObject getValueObject() {
  MyValueObject valueObject = new MyValueObject();
  valueObject.setName(getName());
  valueObject.setId(getId());
  valueObject.setSomeOtherField(getSomeOtherField());
   }
}

The important difference is the loading of the value object gets all of 
the data from the ejb using calls inside of the bean instance and 
specifically the calls don't travel over a Remote or Local interface. 
This means there is no code interpositioned.

-dain



---
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-11-04 Thread Dain Sundstrom
Luttrell, Peter wrote:

It is faster. I tried it in response to danch's message early in the thread.

Thus I have the same question (which no one commented on): Time ~1200ms is
a lot better then the original 2200, but can this still be acceptable for
reading ~10 fields from 750ejbs that are 100% cached?

Here is the email in this thread reporting the results:


I think you will get the same answer, run a profiler and find out what 
is taking the 1200 ms.  It should be obvious.  If you can't fix whatever 
is taking all the time, come back and complain about x being really 
slow.  My guess is the data isn't cached and it is taking 1199 ms to get 
it from the database and 1 ms to build the value object.

-dain



---
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] httpsession clustering overhead

2002-11-03 Thread Dain Sundstrom
Joao Pedro Clemente wrote:

ECPERF is in CVS under the ecperf module.  For testing with 3.0 series,
you'll need to checkout:
ecperf -r Branch_3_0
3.2 and higher, just check out ecperf regulary.



at jboss's CVS server? sorry for asking, but me  cvs aren't that close so
that I fully understand all you said ;-)


Yes, it's in the jboss cvs server.


Also ECPerf is not a good HTTP test.  For that I suggest the RICE study
(JBoss vs. Jonas).  Dain has done some great work porting the test to 3.0,
but we haven't committed it yet.



Any link to it? At a first glance I found the rice university page, but
not the study. Any ideia when the porting will be commited?


The porting is done, but it is no to easy to setup and run.  I doubt it 
will be committed any time soon.

-dain



---
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Performance issue while adding to a EJB 2.0 relation- JBoss version: 3.0.2

2002-11-02 Thread Dain Sundstrom
Chris Bonham wrote:
 I'm running JBoss 3.2.0beta with Dain's Unidirectional performance
 patch, Sun JDK 1.3.1_03 on both Win2K and RedHat Linux 7.3, plus
 XDoclet 1.2.0beta.

 I have two local CMP entity beans with this relationship:

 SelectedBowComponent (M) - (1) BowComponent

 When I create a new SelectedBowComponent, the read ahead cache adds
 the relation SelectedBowComponent_bowComponent.  Then, that
 BowComponent tries to load up all SelectedBowComponents that's it's
 related to.  Since this is a unidirectional relationship, that
 relationship will never be traversed, so why is the data put in the
 cache or is that a bug?  I wouldn't have noticed this problem except
 for the BowComponent the new SelectedBowComponent points to is also
 pointed to by 30 rows!  So, depending on memory settings, the
 read ahead cache insertion process either runs out of memory or the
 transaction times out.  I've attached code snippets below.

Directionally of relationships has no effect on the code; it is just a
matter of convince for designers.  With the performance patch you 
mention above, I make sure to not load relationships unless absolutely 
necessary for referential integrity, so what you are seeing is a bug. 
Please, file a bug report with a simple test case (Order-LineItem) that 
reproduces the error.

-dain



---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Running CMP2 tests: HSqlDB allows duplicate columns

2002-11-02 Thread Dain Sundstrom
Jonathan.O'[EMAIL PROTECTED] wrote:

Folks,
I'm on a mission to allow the same column be mapped to both a CMP field 
and a CMR field.

What version are you targeting this for?  Jboss 4.0 cmp is getting a 
complete rewrite that what will for one thing makes this type of n:m 
data mapping model trivial.  Since 3.0 isn't really getting new 
features, this seems like a lot of work for just the 3.2 release.

If you still decide to go ahead, be really careful with the cached 
values, as each field has a private cache and the last thing we want is 
an inconsistent cache.

I made some mods to one of the tests (ReadOnlyUnitTestCase) and found that 
the create table SQL that JBoss generates contains a column name twice.

Yes, fields are not allowed to be mapped to the same column.  I have 
gotten patches that address the sql generation problem but none have 
address the big cache problem I mention above.

That's fine, but hsqldb doesn't complain. However, Oracle hates such SQL.


The version of hsqldb we use does no real verification of the query.


Which DBs do the unit tests get run against?


hsqldb, postgres and sometimes mysql... some of the other guys have 
tested on oracle

Also, are all new releases supposed to run all unit tests cleanly? I'd 
like to see the test suite report added to release.

They are supposed to, but don't.  All releases should cleanly run the 
tests-db suite, which tests bmp, cmp 1.1 and cmp 2.

-dain



---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-10-31 Thread Dain Sundstrom
Darren Hartford wrote:

Have been having similar issues, and my 'psuedo-hack' tests show similar
results to Georg, so thank you Georg for pointing out that the database
lookups are not the problem, but the object conversion piece.

I don't wish to sell other products, but for a reference, has anyone
seen a difference if they switch to another CMP Persistance engine such
as Gemstone?  I tried their eval on Jboss3.0.3, but I couldn't get it to
work in my environment.  Would be nice to know as a reference if solving


I don't mind you selling Gemstone as they are a JBoss partner.  Gemstone 
should be significantly faster then almost any persistence code as it is 
using a fast persistent object cache under the covers so there is no 
object conversion.  Also relationship navigation is super fast because 
they have live references in cache and I need to do a db call.

the entity-bean performance is clearly tied to CMP/Persistance, and also
have available proven workarounds for people that have short timelines
(yeah, I'm one of the many :-P). Please do not debate about commercial
versus open-source methodology, just looking for solution to immediate
business problems and methods to identify areas of improvements :-).


I plan on running Gerog's test soon as there is really no reason for the 
code to be any slower, but I am working on a new prefetch cache that can 
merge at the end of a tx.

Oh, and LIMIT/OFFSET's would be awesome!!!


Agreed.

-dain



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] transaction question

2002-10-31 Thread Dain Sundstrom
Was this checked before or after my massive check in yesterday?  I know 
you wrote the 29th, but I want to be sure as I messed with most of the 
interceptors.

-dain

David Jencks wrote:
This is pretty strange.  You should be getting this consistently (if you
are really using 2 resource managers in one transaction, one of them being
only local tx capable) or never (if there is only one, for instance your
only datasource).

If you can pin down anything else about how to make this happen I'd like to
know about it.

thanks
david jencks

On 2002.10.31 15:58:49 -0500 [EMAIL PROTECTED] wrote:


JDK 1.4.1
JBoss HEAD 10/29/2002

I have a session bean (A) in one EJB JAR that calls another session bean
(B)
in another EJB JAR which calls another session bean (C) in another EJB
JAR.
I get these warning when A calls B, then when B calls C (2 warnings).  It
happens intermittently but when it occurs, it only seems to happen when I
redeploy the EJB JARs.

...
14:29:23,631 WARN  [TxConnectionManager$LocalXAResource] Prepare called
on a
local tx. Use of local transactions on a jta transaction with more than
one
branch may result in inconsistent data in some cases of failure.
14:29:24,631 WARN  [TxConnectionManager$LocalXAResource] Prepare called
on a
local tx. Use of local transactions on a jta transaction with more than
one
branch may result in inconsistent data in some cases of failure.
...

Is this action (one session bean in one application invoking another in
another application) considered a distributed transaction?  If so, what
should I do to prevent the warning from happening?

Thanks,
Michael


---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: SV: [JBoss-user] Extremely slow transaction

2002-10-30 Thread Dain Sundstrom
This is described in the JBossCMP documentation.  You need a transaction 
around your for loop.  You can start a transaction by using a 
SessionBean or programmatically with a UserTransaction.

-dain

Bekkum, Odd Rune wrote:
Hi!
I'm working on the same project as Jon.

Digging into it a bit more I've found the following:
If we do a findAll on a table containing 252 rows we get 252 SQL calls,
the first one containg 252 ors, the next one 251, then 250.. down to 1.
So from what I understand JBoss first gets all the unique ids, then doing
all the or selects with one less or each time. 
To run this query takes a over 3 minutes.

Have we set up something wrong or is due to the translation from ejb-ql to
JBoss SQL.

Any help appreciated.

Regards
Odd-Rune Bekkum


-Opprinnelig melding-
Fra: Sacha Labourey [mailto:Sacha.Labourey;ml.cogito-info.ch] 
Sendt: 11. oktober 2002 09:57
Til: [EMAIL PROTECTED]
Emne: RE: [JBoss-user] Extremely slow transaction


Hello Jon,


for (id=0;id++;id1000) {
// Start transaction
Collection c=findByStatus(id,status);
for(i=c.iterator();i.hasNext();) {
  ((EntityLocal) (i.next())) . setStatus(newStatus);
}
// End transaction
}



From the log/server.log we see that each findByStatus generates a HUGE 
select statement with around 300 ORs  ( SELECT id FROM VPKRITERIE 
WHERE (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR (id=?) OR
(id=?) 


OK, but when you do the Collection c=findByStatus, the collection c
that you receives contains at least 300 items, right? Temporarly, let's not
speak about the generated statement in itself, but let's focus on what you
are asking to JBoss.

Can you first confirm that the size of the SQL statement is related to the
size of your collection (or smaller). I mean, can you confirm that the
result of findByStatus is not a collection of 2 items and that the SQL
statement includes 300 ORs.



We have tried to play around with conf/standardjbosscmp-jdbc.xml and 
standardjaws.xml, but to no help.  The parameteres set is:


the best way will be to play, finder by finder, in the jbosscmp-jdbc.xml of
your application once we've understood what is really happening. Playing
with standardjaws.xml is useless unless your using JAWS instead of JBossCMP
(depends on the DocType declaration of ejb-jar.xml)

Cheers,

			Sacha




---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-10-30 Thread Dain Sundstrom
Georg Schmid wrote:

It seems that my (and, at least to some degree, Peter's) specific
problem is misunderstood.


Sorry, that happens all the time on the lists


In my case: the problem is NOT getting the data from the database fast
(the finders execute fast enough).
I think Jboss does not have a problem there, but that's my guess, as I
do not have personal experience
with other app servers.

The performance is lost, when I try to convert the a collection of local
entity bean references
into a collection of value objects. None of the previous posts (except
Peter's) touches upon this subject.

I want to understand and, if possible, solve this 'value object
conversion speed' problem:


snip/

The for-loop should be able to convert 1000 local entity bean references
per second or better for simple entity beans.


Can you send me this code so I can test with a profiler?  I want to know 
where all the time is spend.  What version of JBoss are you using?

I am not interested in any CMP vs non-CMP debate. TSS may be a better
place for this.


Agreed.


It would be convenient, if the size of the result sets, that can be
handled using CMP, coincides with the number of rows
you should/could reasonably display in a dialog or page in your
(web-based) GUI. This would remove the need to switch
to raw JDBC, when doing the CMP equivalent of plain vanilla (for
instance) select * from BeanTable where lastUpdate = '10/20/2002'
queries. That's all I hope for. 

You lost me.  JBoss 4.0 will have support the LIMIT someNumber OFFSET 
someNumber syntax.  Is that what you are talking about.

I would like to be able to support Date literals, but I don't want to 
get too far in front of the spec.  Does anyone know where I can find the 
ANSI SQL spec on date literals?  (I'm not interested in how Oracle does 
this... I want to know the standard).

CMP will keep getting more powerful over time. Using it is 'Making the
trend work for you'.


Yep... keep the suggestions coming, and we can make this the best 
persistence engine period.

-dain



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-10-29 Thread Dain Sundstrom
 in this information 
constitute our judgment as of this date and are subject to change 
without notice. Any information you share with us will be used in the 
operation of our business, and we do not request and do not want any 
material, nonpublic information. Absent an express prior written 
agreement, we are not agreeing to treat any information confidentially



and will use any and all information and reserve the right to publish 
or disclose any information you share with us.



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




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



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



This transmission contains information solely for intended recipient and may
be privileged, confidential and/or otherwise protect from disclosure.  If
you are not the intended recipient, please contact the sender and delete all
copies of this transmission.  This message and/or the materials contained
herein are not an offer to sell, or a solicitation of an offer to buy, any
securities or other instruments.  The information has been obtained or
derived from sources believed by us to be reliable, but we do not represent
that it is accurate or complete.  Any opinions or estimates contained in
this information constitute our judgment as of this date and are subject to
change without notice.  Any information you share with us will be used in
the operation of our business, and we do not request and do not want any
material, nonpublic information. Absent an express prior written agreement,
we are not agreeing to treat any information confidentially and will use any
and all information and reserve the right to publish or disclose any
information you share with us.


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



--

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




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



Re: [JBoss-user] Entity Bean Performance Tuning Help

2002-10-29 Thread Dain Sundstrom
Jason Westra wrote:

Hi JBoss friends,

I tend to agree with Bill and Dain's last posting here.  There are certain
things that CMP is not designed to do *well* and large, heavy reads is one
of them.


I disagree with you here.  It depends on the type of reads you are 
doing.  A lot of applications increase performance by offloading 
processing to the database with very complex queries and stored 
procedures, and the current CMP design can not benefit from this design. 
 The JBoss 4.0 design will be able to benefit from hand tuned queries.

I'd venture to guess the same performance problem will occur on other app
servers, in which case, it is not a war of servers, but a principle of
application design (SSB+JDBC vs. CMP).  If the numbers come in much better
from testing on other app servers, we need to get JBoss fixed. Until then,
I'd recommend a different approach than CMP.


My goal for the 4.0 architecture is to enable the easy use of a hybrid 
approach to CMP.  In this design you can use CMP for the 98% of you app 
that performs well under the current code and for the 2% that needs hand 
code you can plug in a custom interceptor to tune queries.

-dain



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


  1   2   3   4   5   >