Re: [JBoss-user] CMP 2.0 Deployment Problem
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
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
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
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] JBoss 3.2RC4 and Hibernate2
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] JBoss 3.2RC4 and Hibernate2
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.(CodeGenerator.java:105) at net.sf.cglib.KeyFactoryGenerator.(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] massive performance decrease
I have no plan to backport the changes, as it depends on a bunch of other changes only in 4.0. I don't think it would be to hard to backport (4-8 hours), but I'm still not satisfied with the implementation and plan on making more optimizations. Most importantly, this is all new code (complete rewrite) and I rather not introduce new bugs into 3.2. I have had my mind changed on this type of thing before, so if the community finds this code bug free, fast, and demands it backported, I will cave. -dain On Thursday, April 3, 2003, at 12:38 AM, Hunter Hillegas wrote: Any chance of that change being backported to 3.2? From: Dain Sundstrom <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Wed, 2 Apr 2003 23:06:41 -0600 To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] massive performance decrease 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
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] CMR Error under load
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] Optimized CMP loading
You need to use a transaction for the access. We can not assume that data read in one transaction is valid in another transaction. -dain On Thursday, April 3, 2003, at 08:39 AM, Simone Milani wrote: I am using read-ahead: on-find 50 It keeps saying no preload data found while actually before has loaded the data. 2003-04-03 15:28:44,293 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MDSDbax] Executing SQL: SELECT MD_KEY,MD_BUSINESS_AREA, MD_CLASS, MD_CURRENCY, MD_DATEVALUE, MD_FIELDNAME, MD_FLOATVALUE, MD_INSTANCE, MD_LOCATION, MD_NAME, MD_STRING_VALUE, MD_TYPEID FROM MDS_DBAX WHERE (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) OR (MD_KEY=?) 2003-04-03 15:28:44,293 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSDbax.mDK ey] Set parameter: index=1, jdbcType=NUMERIC, value=4707 2003-04-03 15:28:44,293 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSDbax.mDK ey] Set parameter: index=50, jdbcType=NUMERIC, value=4756 2003-04-03 15:28:44,309 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSDbax.mDK ey] Get result: index=1, javaType=java.lang.Long, Simple, value=4708 2003-04-03 15:28:44,309 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.MDSDbax.bus iness Area] Get result: index=2, javaType=java.lang.String, Simple, value=OTC 2003-04-03 15:28:44,309 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] Add preload data: entity=MDSDbax pk=4708 field=businessArea ... get and load all results. 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] Add preload data: entity=MDSDbax pk=4756 field=typeId 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.EntityMultiInstanceSynchronizationInterceptor] register, [EMAIL PROTECTED], tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=dblon34056//23, BranchQual=] 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.EntityMultiInstanceSynchronizationInterceptor] register, [EMAIL PROTECTED], tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=dblon34056//23, BranchQual=] 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.EntityLockInterceptor] End invoke, key=4707 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=getMDSDbaxValue 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor] invokerBInding is null in ProxyFactoryFinder 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=getMDSDbaxValue 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is TransactionImpl:XidImpl [FormatId=257, GlobalId=dblon34056//23, BranchQual=] 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getMDSDbaxValue 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=dblon34056//23, BranchQual=] 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.EntityLockInterceptor] Begin invoke, key=4708 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance [EMAIL PROTECTED] com.db.jbozz.ejb.entity.mds.MDSDbaxCMP 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.lock.JDBCOptimisticLock] schedule> method=getMDSDbaxValue; tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=dblon34056//23, BranchQual=] 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.lock.JDBCOptimisticLock] schedule> other tx came in: tx=0; ctx.id=4708 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.lock.JDBCOptimisticLock] schedule> modified strategy: locking all field values 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] load data: entity=MDSDbax pk=4708 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] Preloading data: entity=MDSDbax pk=4708 cmpField=instance 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] Preloading data: entity=MDSDbax pk=4708 cmpField=location 2003-04-03 15:28:44,403 TRACE [org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.MDSDbax] Preloading data: entity=MDSDbax pk=4708
Re: [JBoss-user] massive performance decrease
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] CMR Error under load
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.(int) line: 114 [local variables unavailable] java.lang.StringBuffer.() 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.invo
Re: [JBoss-user] List ten things you want fixed (was Re: JBoss: Not Ready For Prime Time)
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
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
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[4]: [JBoss-user] effective and secure logging
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: Re[2]: [JBoss-user] effective and secure logging
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: [JBoss-user] new datasource
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] new datasource
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] Am I in a transaction?
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] jboss on linux (performance)
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] read-ahead question
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: UsersBean on-find 4 * 1000 users ... 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: Standard CMP 2.x EntityBean A 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
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] Relationship between JTA and JDBC transactions
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 Insert/Commit after ejbPostCreate()
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 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] CMP Entity Bean commit-option problem
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 I’d 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: . . . Standard CMP 2.x EntityBean B 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. invokeNext(StandardPipeline.java:641) ??? at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j ava:246) ??? at
Re: [JBoss-user] Jboss dynamic ql ?
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
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] Caching large data structures
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=10610&article_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] DynamicQL concurrency problem
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() 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(HttpServl
Re: [JBoss-user] Issue with LIKE CONCAT(?1,'%') in JBoss-QL
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] Issue with LIKE CONCAT(?1,'%') in JBoss-QL
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 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] EntityBean findAll() method
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: on-find 2 * needed about 4,2 sec. (=100%) 2nd test: on-find 4 * needed about 6,4 sec. (+52% copared to 1st test) 3rd test: on-find 10 * 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: > > > > findAll > > > > > > 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
[JBoss-user] JBoss on FreeBSD
My favorite OS is FreeBSD, but I haven't use it in a long time because of VM support. I notice they have like a half dozen VMs now, so I interested again... Is anyone running JBoss 3.x on FreeBSD? In production? What VM are you using? How is the performance? Was it difficult to setup? Thanks, -dain --- 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
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: Tidy com.base2inc.app.filter.FilterTidy Tidy /*.jsp 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] 10.5.6 finder missing query element exception with 3.0.6
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: findByProfileHandle java.lang.String Neither made a difference. In ejb-jar.xml it insists on a tag, so I added the following to ejb-jar.xml instead, which still generated the same problem: findProfileHandle String 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] 3.0.x, XDoclet, CMP and Optomistic Locking
That is a lame assumption. The spec requires that we synchronize the cached EJB state with the database before executing a query. Furthermore, the spec allows us to call ejbStore anytime we feel like it. -dain On Tuesday, February 11, 2003, at 06:40 PM, Brian Wallis wrote: The real issue here seems to be that ejbStore() is called either each time a finder is run or each time the getPlanValue() method is called. If this is what is happening then it invalidates the assumption that xdoclet is making in generating the version update code where it puts the increment in ejbStore(). On Tue, 11 Feb 2003 12:31, Brian Wallis wrote: I am porting an app from 2.4.4 JBoss to 3.0.4. The app uses xdoclet to generate various classes, in particular the CMP class for an Entity bean. It is using the "use-soft-locking" flag in the @ejb.bean tag to generate a version number field for optomistic locking. The version number is incremented in the ejbStore() method. Unfortunatly, ejbStore() seems to be called when the bean is read, so each time I get a value object back after: Plan plan = _home.findByPrimaryKey(key); PlanValue value = plan.getPlanValue(); the version number is different (incremented). Of course I get a "Wrong Version" exception if I try to store a new value in the plan. Should this work? As far as I know the application used to work with 2.4.4 JBoss (but I didn't work on it then). thanks, brian wallis... --- 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
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
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
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
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
On Friday, February 7, 2003, at 09:48 AM, Rafal Kedziorski wrote: After start JBoss I get this error: Was expecting one of: "IN" ... ... )] 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
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
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
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] RE: question about jboss cmp
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] Getting Distinct to Use UCASE() or UPPER() in JBossQL or DeclaredSQL??
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> ... HH> ... HH> ... HH> ... HH> ... HH> ... 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> HH> HH> HH> SampleRequestLineItemBean HH> lineItem HH> HH> ... HH> HH> It doesnt 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] Getting Distinct to Use UCASE() or UPPER() in JBossQL or DeclaredSQL??
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" ... ... ... ... ... ... ... 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: SampleRequestLineItemBean lineItem ... It doesnt 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] serious ejbql compiler problem
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) > > Partner - StoreCategory > > > PartnerStoreCategoryRole > relationship-role-name> > One > > Partner > > > storeCategories > java.util.Collection > > > > > StoreCategoryPartnerRole > relationship-role-name> > Many > > StoreCategory > > > partnerOwner > > > > > 2) > > Partners - StoreCategory > > > PartnerStoreCategoryRole > relationship-role-name> > Many > > Partner > > > categories > java.util.Collection > > > > > StoreCategoryPartnerRole > relationship-role-name> > Many > > StoreCategory > > > partners > java.util.Collection > > > > > 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 --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
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) Partner - StoreCategory PartnerStoreCategoryRole One Partner storeCategories java.util.Collection StoreCategoryPartnerRole Many StoreCategory partnerOwner 2) Partners - StoreCategory PartnerStoreCategoryRole Many Partner categories java.util.Collection StoreCategoryPartnerRole Many StoreCategory partners java.util.Collection 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
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
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
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] Store large pdfs with JBoss
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 d
Re: [JBoss-user] CompositeName and JBoss 3.0.4
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] Question about CMP/CMR
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] Question about CMP/CMR
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] How to INSERT after ebjPostCreate versus ejbCreate
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] Question about CMP/CMR
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] Date and jboss
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] Re: jboss and vi ( Re: [JBoss-dev] NEED YOUR HELP!
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] Testing EJB's
If you want to test in JBoss, you will need to have JBoss running somehow. Unless you are running on a very old machine, the JBoss start up should be start fairly quickly (under 30 sec). I usually just leave a JBoss instance running, and test over and over again. -dain On Wednesday, December 11, 2002, at 11:15 AM, Jim Crossley wrote: Thanks, Dain. At first, I was encouraged by your reply, so I checked out the source, but it doesn't address my needs. At least, the branch I checked out (3.0 and jboss-head) could not run the testsuite successfully without first firing up JBoss. I want to be able to test my CMP's in an in-memory, lightweight EJB container that I can somehow quickly bootstrap from my JUnit testrunner. The CMP's would persist for the duration of the tests in the in-memory Hypersonic database. Perhaps EJB's are so resource intensive that something like this isn't feasible? -- Jim Dain Sundstrom <[EMAIL PROTECTED]> writes: 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
Re: [JBoss-user] EJB Commit Option A Cache Question
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] Re: Testing EJB's
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 em
Re: [JBoss-user] Testing EJB's
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] Another Commit Option A Cache Question :)
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] J2ee spec thoughts
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] J2ee spec thoughts
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
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
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] custom function extensions to EJB-QL?
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] custom function extensions to EJB-QL?
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?
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] sotring a cmr result set
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
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 pk: accountNum Userids: accountNum:number userid:String startdate:date 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] problem with ejb-ql
On Monday, November 25, 2002, at 07:57 PM, Tania G. Ramos wrote: 2002-11-25 22:45:13,612 ERROR [org.jboss.ejb.EjbModule] Starting failed org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "obj.docTip" at line 3, column 49. Was expecting one of: "NOT" ... "(" ... ... ... "CONCAT" ... "SUBSTRING" ... ... ... ... ... ... "LENGTH" ... "LOCATE" ... "ABS" ... "SQRT" ... "+" ... "-" ... ... ... ... ) I can't understand why it happens. What I really wanted is something more robust than this (I wanted that one of these parameters were a Class (using dependent-value-class) But with This simple example, it didin't work, imagine with a more difficult one. Does anyone know how to solve this?I'm using jboss3.0.0 Is docTip a String? My guess is it is not and EJB-QL only allows the comparison of like types. To fix it make docTip a string or change the parameter to be the same type. Of course if you want to use EJB-QL instead of JBoss-QL you have to use an EJB-QL supported type (String, date, arithmetic, ejb). -dain --- 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 Performance: Weblogic7 Much Faster Then JBoss
Can you try 4.0? -dain On Saturday, November 23, 2002, at 06:34 AM, Stephen Coy wrote: This change is now in Branch_3_2. It looks a little like 3.2 has acquired some other baggage though - our "benchmark" for 2000 beans is a little slower than it was under 3.0.4: 23:06:47,044 INFO [STDOUT] creating 2000 Blobs... 23:07:30,811 INFO [STDOUT] Creation complete, took 43764ms. 23:07:51,591 INFO [STDOUT] testing retrival speed... 23:07:51,593 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache. 23:07:52,007 INFO [STDOUT] finder took 411ms. 23:07:57,986 INFO [STDOUT] External ValueObject creation took 5975ms for 2000 objects. 23:08:00,044 INFO [STDOUT] Internal ValueObject creation took 2056ms for 2000 objects. 23:08:00,049 INFO [STDOUT] Secondary Retrival, beans are in cache. 23:08:02,601 INFO [STDOUT] finder took 2545ms. 23:08:07,697 INFO [STDOUT] External ValueObject creation took 5094ms for 2000 objects. 23:08:09,953 INFO [STDOUT] Internal ValueObject creation took 2252ms for 2000 objects. 23:09:12,788 INFO [EntityContainer] flushing cache 23:09:26,079 INFO [EntityContainer] flushing cache 23:09:50,267 INFO [STDOUT] testing retrival speed... 23:09:50,269 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache. 23:09:52,388 INFO [STDOUT] finder took 2116ms. 23:10:27,358 INFO [STDOUT] External ValueObject creation took 34968ms for 2000 objects. 23:10:29,662 INFO [STDOUT] Internal ValueObject creation took 2300ms for 2000 objects. 23:10:29,665 INFO [STDOUT] Secondary Retrival, beans are in cache. 23:10:33,235 INFO [STDOUT] finder took 3569ms. 23:10:39,176 INFO [STDOUT] External ValueObject creation took 5939ms for 2000 objects. 23:10:41,187 INFO [STDOUT] Internal ValueObject creation took 2009ms for 2000 objects. Steve Coy On Friday, November 22, 2002, at 10:50 PM, Christian Riege wrote: hi stepehn et. al, As far as the Finders are concerned, I suspect that the issue may be in the ReadAheadCache code. yeah ReadAheadCache is currently the HotSpot. I think Dain did some optimizations for that in 3.2 which haven't made it into 3.0 just yet? if you port the fix that you applied to 3.0 (the GlobalTxEntityMap one) to 3.2 i can re-run through OptimizeIt and see if its faster. regards, christian --- 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] CMR Performance: Weblogic7 Much Faster Then JBoss
I completely rewrote the cache in 4.0 it is now called PrefetchCache and it no longer uses all the funky data structures. It can also merge Prefetched data back into the main cache when the transaction ends, instead of throwing it away. This rocks for Commit Option A but does not help B or C. Does anyone want to back port this to 3.2? It is fairly simple. If not, I'll do it. I don't think I should back port it to 3.0 as it has not been heavily tested. -dain On Friday, November 22, 2002, at 07:26 AM, Stephen Coy wrote: I'll try to get it done in the next day or so. On Friday, November 22, 2002, at 10:50 PM, Christian Riege wrote: hi stepehn et. al, As far as the Finders are concerned, I suspect that the issue may be in the ReadAheadCache code. yeah ReadAheadCache is currently the HotSpot. I think Dain did some optimizations for that in 3.2 which haven't made it into 3.0 just yet? if you port the fix that you applied to 3.0 (the GlobalTxEntityMap one) to 3.2 i can re-run through OptimizeIt and see if its faster. regards, christian --- 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] Dynamic query and read-ahead - Help!!
Upgrade and it should work. -dain On Thursday, November 21, 2002, at 06:48 PM, Victor Batista wrote: Hello! I am using JBoss 3.0.2 with bundled Tomcat 4.0.4. I am having problems using "read-ahead" with Dynamic queries. I configure my dynamic finder with the read-ahead feature, but it simply ignores them and behaves always the same. With no Dynamic queries, it works great. I configured my finder using Xdoclet. The Xdcolet configuration, the ejb-jar.xml extract and the jbosscmp-jbcd.xml extract are appended below. I need the dynamic feature because I need to execute a "SELECT...WHERE xpto IN (..,..)". Below are two log messages extracted from the JBoss log when my dynamic query was a simple "Select". When I execute the finder (1), the query returns all columns (no matter if my strategy is "on-load" or "on-find"). After this, if I execute one method which returns one Value Object with all the columns, another select is automatically executed by the container (2). This select shouldn't be necessary once I am still in the same transaction, so the previous data is still valid. If I only access columns from the Primary Key (instead of getting the VO with all columns), the select (2) isn't executed. I have concluded that I can't configure "read-ahead" on Dynamic queries. Is this the expected behavior? Is it related with the JBoss version I am using? Am I doing any thing wrong? I don't want to execute two consecutive selects which return the same data... Any help would be really appreciated!! Thanks in advance, Victor Batista (1) 2002-11-22 00:17:11,109 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.User.findAllIn] Executing SQL: SELECT t0_u.username, t0_u.name, t0_u.surname, t0_u.passwd, t0_u.int_num, t0_u.description, t0_u.creation_date FROM DC_USERS t0_u WHERE t0_u.username = 'vbatista' (2) 2002-11-22 00:17:11,129 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.User] Executing SQL: SELECT name, surname, passwd, int_num, description, creation_date FROM DC_USERS WHERE (username=?) FOR UPDATE XDOCLET CONFIGURATION * @ejb:finder signature="java.util.Collection findGeneric(java.lang.String query, java.lang.Object[] args)" * query="" * * @jboss:query signature="java.util.Collection findGeneric(java.lang.String query, java.lang.Object[] args)" * dynamic = "true" *strategy="on-load" EJB-JAR findGeneric java.lang.String java.lang.Object[] JBOSSCMP-JDBC findGeneric java.lang.String java.lang.Object[] on-find --- 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] does PostgreSQL support the EJB-QL LOCATE() function?
No, but that has nothing to do with JBoss; table size is a database issue. The important part that the query's come out correctly. -dain On Thursday, November 21, 2002, at 03:35 PM, snpe wrote: Hello Dain, Have You tried big tables (> 100 big record) with postgresql ? Thanks Haris Peco On Thursday 21 November 2002 05:47 am, Dain wrote: Yes. PostgreSQL is one of the few database I personally extensively tested, so I am very confident it works (at least in the newest versions). -dain On Wednesday, November 20, 2002, at 09:18 PM, Herve Tchepannou wrote: does PostgreSQL support the EJB-QL LOCATE() function? -- Herve Tchepannou mailto:[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 --- 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] how to produce pdf files like jboss getting started guide?
Type the doc in whatever you like, generate a postscript file and use ps2pdf (http://stat.tamu.edu/doc/gs/Ps2pdf.htm). -dain On Wednesday, November 20, 2002, at 09:05 PM, David Jencks wrote: if you do some archaeology on the old, obsolete, free manual you will find it uses a build system like docbook xml source docbook xsl stylesheet transforms apache fop to output pdf. When I worked on it there were a few problems, but I liked the process. Apparently no one else did, however. I suspect FOP has progressed since I last looked, and I think there are other flow object processors now available to convert appropriate xml to pdf. I think the firebird project (on sourceforge) still has a working setup like this in the manual module. david jencks On 2002.11.20 21:02:19 -0500 linuxman wrote: Thanks jason! But I like latex or lyx, not m$ word:-). Any other tools? espcially open source software? Jason Essington wrote: they use ms word On Wednesday, November 20, 2002, at 05:26 PM, linuxman wrote: I's sorry out of the topic, but anyone would like to tell me how to produce perfect pdf files like jboss getting started guide book? Thanks in advance! linuxman --- 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] does PostgreSQL support the EJB-QL LOCATE() function?
Yes. PostgreSQL is one of the few database I personally extensively tested, so I am very confident it works (at least in the newest versions). -dain On Wednesday, November 20, 2002, at 09:18 PM, Herve Tchepannou wrote: does PostgreSQL support the EJB-QL LOCATE() function? -- Herve Tchepannou mailto:[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] Re: configuring security if web and ejbs on different machines
On Wednesday, November 20, 2002, at 03:58 PM, Randy Shoup wrote: Dain wrote: There is no reason you have to separate the web container from the EJB container. The only reason this ever came up in J2EE is the other vendors charge so much for a CPU license you wanted to maximize the CMP utilization of the EJB boxes. The only good reasons I have heard is security. For security I don't believe that you can get the same benefit by using a proxy process in front. Just out of curiosity, why would it be less secure to use a reverse-proxy? You ought to be able to put the reverse-proxy in the DMZ, and the J2EE container (with web + EJB components) behind the internal firewall. Now there is no application code of any kind in the DMZ (so there is nothing to lose if this machine is compromised), and you only have to open the single HTTP port to the backend machine. (I realize I am asking you to explain a position you don't believe, but I am curious what you have heard :-) I' am dumb ass today. That was a typo. It should have read: "For security I *DO* believe that you can get the same benefit by using a proxy process in front." I can explain my reasons for believing that if you want, but I think you already agree with me. -dain --- This sf.net email is sponsored by: Battle your brains against the best in the Thawte Crypto Challenge. Be the first to crack the code - register now: http://www.gothawte.com/rd521.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] configuring security if web and ejbs on different machines
There is no reason you have to separate the web container from the EJB container. The only reason this ever came up in J2EE is the other vendors charge so much for a CPU license you wanted to maximize the CMP utilization of the EJB boxes. The only good reasons I have heard is security. For security I don't believe that you can get the same benefit by using a proxy process in front. -dain On Wednesday, November 20, 2002, at 12:09 PM, Pavel Kolesnikov wrote: Hello, I've configured my security realm on my JBoss 3.0.2 server. Everything works fine, but now I'd like to separate web container and EJB container to different machines. Is there any way how to configure it to make a web container to authenticate users against realm configured on different machine and above all to propagate the security context to EJBs running on different machine? I tried to find the answer in forums, but I found just unanswered questions :) Thanks a lot Pavel, --- This sf.net email is sponsored by: Battle your brains against the best in the Thawte Crypto Challenge. Be the first to crack the code - register now: http://www.gothawte.com/rd521.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: Battle your brains against the best in the Thawte Crypto Challenge. Be the first to crack the code - register now: http://www.gothawte.com/rd521.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JBoss "authorized" consultant
On Tuesday, November 19, 2002, at 12:16 PM, Albretch Mueller wrote: Hi, the following is in reference to the JBoss "authorized consultant" program: http://jboss.org/services/partners/Services_Affiliate_Intro.pdf I had never seen such a certification you must pay $5,000.00 yearly to keep it and doesn't even buy you actual "support". I don't speak for The JBoss Group, but I know a little about this program. I think you are confused. If you want support during your application development or production, you buy a regular support contract. If you want to offer support and use the JBoss logo or the term "JBoss Authorized Consultant" in you marketing, you pay the 5k, attend a training and pass the test. If you can't pass the test The JBoss Group refunds the difference between a training seat and the amount you paid ($1500). Of course, I don't think that anyone would even dare trying to make you pay that amount basically for a certification. (However they want to adorn it) And you would be wrong. How much do you usually pay for other such service level agreements? By check or PO. Isn't JBoss definitely off with that one? How dows JBoss' "authorized consultant" program fares with other similar commercial app. servers' ones? Again, I'm not the voice of The JBoss group, but I would bet they don't care what the other commercial app server companies are doing. The JBoss Group is building a network of high quality consultants, and the 5k buy in is a good filter. I suggest that if you want to test the quality of our consultants, you hire IBM Global services for a week and then hire a (single) JBoss consultant for one day, and judge for you self on which group you got the most benefit from. -dain --- 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] help please with ejbql
You can't do that. You will have to preprocess the query using dynamic ql. Here is what you do: 1) add a new home method selectByCodes (or queryByCodes) 2) in the home method implementation ejbHomeSelectByCodes you generate an EJB-QL query that uses an in operator in the where instead of the member of. Something like this: Speciality.code in (?1, ?2, ?3, ?4). 3) after you generate the query call a dynamic ql mapped ejbSelect query. You will have to convert the collection into an Object array but that is simple with toArray. Fairly simple? -dain On Tuesday, November 19, 2002, at 11:40 AM, kiuma wrote: Hi all, I'm trying to write this query *signature="java.util.Collection findByCodes( java.util.Collection pCodes )" *result-type-mapping="Local" *query="SELECT OBJECT(Speciality) FROM WaSpeciality Speciality WHERE Speciality.code MEMBER OF ?1" I think that jboss and ejb in general don't like this form. Is there any way to extract a collection of beans matching a collection of id? regards --- 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 --- 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
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. 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 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. 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
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] Entity Bean Performance Tuning Help (intersection)
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
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= which could use similar low level tokens as the existing grammar when doing SELECT ... WHERE SomeField= 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)
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] Entity Bean Performance Tuning Help
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] Off topic: Never use Expedia
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 -- xxxx 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
[JBoss-user] Off topic: Never use Expedia
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] Entity Bean Performance Tuning Help
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,
Re: [JBoss-user] ejbCreate violating database 'NOT NULL' constraints(foreign keys)
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] CMR Performance: Weblogic7 Much Faster Then JBoss
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] CMR Performance: Weblogic7 Much Faster Then JBoss
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 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. -- xxxx 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] character literal comparison in JBoss-QL
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" ... "(" ... "+" ... "-" ... ... ... ... ... ) 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] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)
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 inclu