Re: [JBoss-dev] Reverse CMP?
Brian Gilman wrote: Hello, Does anyone know of an open source project which is doing anything akin to what cocobase does? ie. Automatically generating EJB's from databases? I have recently started a project to do just this but did not want to waste my efforts. Thanks! -Brian --- I just wrote a perl script that converted an SQL92 schema to an input file for ejbdoclet. I still have to hand code relations but the majority of the grunt work (ie. basic column data) is done by the perl script. Contact me off the list if you want to see the source code. Dave ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] NOWAIT option
PosgreSQL does not support the NOWAIT option. It is not in the SQL92 spec. Bill Burke wrote: How do you know if appending NOWAIT to the select statement is correct syntax for all DBMS? What's wrong with my old suggestion? Have templates for specific DB queries like select-for-update. From my old post: What do you think of these ideas? What I wanted to do was extend the database typemappings in standardjaws.xml. type-mappings type-mapping-definition nameOracle8/name select-for-update-supportedtrue/select-for-update-supported select-for-update-format![CDATA[SELECT %i FROM %t WHERE %w FOR UPDATE]]/select-for-update-format select-for-update-no-wait-supportedtrue/select-for-update-supported select-for-update-no-wait-format![CDATA[SELECT %i FROM %t WHERE %w FOR UPDATE NOWAIT ]]/select-for-update-format mapping java-typejava.lang.Boolean/java-type jdbc-typeBIT/jdbc-type sql-typeSMALLINT/sql-type /mapping where %i is the items to be select, %t is the tablename, and %w is the where clause. If a bean turns on select-for-update and it is not supported by the type-mapping, then an exception should be thrown on deployment. Maybe your rowid thingy should be put in there as well in the same manner. And then in jaws.xml select-for-update wait=truetrue/select-for-update -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vinay Menon Sent: Friday, August 10, 2001 4:18 AM To: JBossDev Subject: [JBoss-dev] NOWAIT option Hello, Had made a little change to JawsEntityMetaData and the JDBCLoad thingey to support the NOWAIT, select for update option. Worthwhile if I post the change here? The idea is simple 1. Have a field in jaws.xml called wait-option 2. Don't specify it if you don't need anything special. If you want a no wait option specify it as wait-optionNOWAITwait-option or any other option that is dbms specific 3. In the LoadEntityCommand append this text to the select for update sql if select-for-update has been specified to be true. Vinay ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] NOWAIT option
Yes. Bill Burke wrote: Which is why I wanted the NOWAIT flag in type-mappings so that when the bean deployed an exception would be thrown if nowait was turned on. Agree? Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dave Smith Sent: Friday, August 10, 2001 12:11 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-dev] NOWAIT option PosgreSQL does not support the NOWAIT option. It is not in the SQL92 spec. Bill Burke wrote: How do you know if appending NOWAIT to the select statement is correct syntax for all DBMS? What's wrong with my old suggestion? Have templates for specific DB queries like select-for-update. From my old post: What do you think of these ideas? What I wanted to do was extend the database typemappings in standardjaws.xml. type-mappings type-mapping-definition nameOracle8/name select-for-update-supportedtrue/select-for-update-supported select-for-update-format![CDATA[SELECT %i FROM %t WHERE %w FOR UPDATE]]/select-for-update-format select-for-update-no-wait-supportedtrue/select-for-update-supported select-for-update-no-wait-format![CDATA[SELECT %i FROM %t WHERE %w FOR UPDATE NOWAIT ]]/select-for-update-format mapping java-typejava.lang.Boolean/java-type jdbc-typeBIT/jdbc-type sql-typeSMALLINT/sql-type /mapping where %i is the items to be select, %t is the tablename, and %w is the where clause. If a bean turns on select-for-update and it is not supported by the type-mapping, then an exception should be thrown on deployment. Maybe your rowid thingy should be put in there as well in the same manner. And then in jaws.xml select-for-update wait=truetrue/select-for-update -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Vinay Menon Sent: Friday, August 10, 2001 4:18 AM To: JBossDev Subject: [JBoss-dev] NOWAIT option Hello, Had made a little change to JawsEntityMetaData and the JDBCLoad thingey to support the NOWAIT, select for update option. Worthwhile if I post the change here? The idea is simple 1. Have a field in jaws.xml called wait-option 2. Don't specify it if you don't need anything special. If you want a no wait option specify it as wait-optionNOWAITwait-option or any other option that is dbms specific 3. In the LoadEntityCommand append this text to the select for update sql if select-for-update has been specified to be true. Vinay ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JDBC SQL Extensions
When it comes to the outer joins I would be vary careful if not try to avoid them altogether. The SQL spec is washy at best and I believe that each vendor does it a little differntly , PostgeSQL only added outer joins in version 7.1. The IS EMPTY cluase ... after reading the spec are they assuming that you are checking if an obects collect is empty or are you looking for all ojects that empty collections? Either way I would look at the exists clause. Dain Sundstrom wrote: all JDBC experts, Is it common for the JDBC drivers to support the SQL Extension functions? http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec/jdbc-spec.frame11.html I specifically need the functions: concat, substring, locate, length, abs, and sqrt. I'm planing on mapping these to {fn concat('str1', 'str2')} style functions. If it is not common to support these fuctions I'll write a function map spec in the xml. Also, do most vendors support the {oj outer-join} syntax like: SELECT * FROM {oj order LEFT OUTER JOIN line_item ON order.ordernumber=line_item.ordernumber} I think I need this to support the IS EMPTY operator in queries like: SELECT OBJECT(o) FROM Order o WHERE o.lineItems IS EMPTY Thanks for any help -dain P.S. I just found some docs that say that Oracle drivers do not support any of these portability features (my words). Does anyone find this supprising? (I'll keep my feelings on this to my self). Any way, if it is true, I'll implement this the hard way after I get the easy way working. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JDBC SQL Extensions
Dain Sundstrom wrote: Sorry for the confusion. There are two issues here. == Issue1: use of the {fn concat(str1, str2)} style functions. Solution: use fn style functions as default but have override in xml like: concat-functionCONCAT (?1, ?2)/concat-function or some thing simmilar. == Since I have only used the PostgreSQL driver hard to say how other vendors JDBC drivers are but have heard lots of comments about Oracle I would suggest you try and code to the lowest JDBC version and wrap up the strange bits in the xml (more jaws stuff). For example in Postgresql, concat is || so .. concat-function?1 || ?2/concat-function Looks like the way to go ... (Dam more work!) Issue 2: IS EMPTY function. How should I map the following ejb-ql query: SELECT OBJECT(o) FROM Order o WHERE o.lineItems IS EMPTY Solution A: SELECT o.ordernumber FROM Order o WHERE NOT EXISTS ( SELECT l.pk FROM Order o, LineItem l WHERE o.ordernumber = l.ordernumber) I like this because it does not use an outer join (thanks Dave Smith). Does it have performance problems? Solution B: SELECT o.ordernumber FROM Order o LEFT OUTER JOIN LineItem l ON o.ordernumber = l.ordernumber WHERE l.ordernumber IS NULL This would be a major pain to map to all vendors. Either way the query will have to read the entire order file to check the lineitems . I would get it working first then optimize, might be there but not offen used. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] SQL function mapping
Dain I added the function mapping code to the EJB-QL to SQL translation engine. I added mappings for MS SQLServer, Oracle, MySQL and PostgreSQL to the standard jboss cmp xmp file. Notes: - These mappings are completely based on info from the 'SQL in a Nutshell' book, so they may not work (I don't use any of these databases). - PostgreSQL doesn't have a three argument position function, so I didn't It is simply two functions position(?2 in substring(?1 from ?3))+?3 map it. - Send me any corrections or change it your self. - If not mapping is provided the system defaults to {fn concat(param1, param2)} style functions. The mappings follow this message. -dain Oracle: function-mapping function-nameconcat/function-name function-sql(?1 || ?2)/function-sql /function-mapping function-mapping function-namesubstring/function-name function-sqlsubstr(?1, ?2, ?3)/function-sql /function-mapping function-mapping function-namelength/function-name function-sqllen(?1)/function-sql /function-mapping function-mapping function-namelocate/function-name function-sqlinstr(?1, ?2, ?3)/function-sql /function-mapping function-mapping function-nameabs/function-name function-sqlabs(?1)/function-sql /function-mapping function-mapping function-namesqrt/function-name function-sqlsqrt(?1)/function-sql /function-mapping MS SQLServer: function-mapping function-nameconcat/function-name function-sql(?1 + ?2)/function-sql /function-mapping function-mapping function-namesubstring/function-name function-sqlsubstring(?1 FROM ?2 FOR ?3)/function-sql /function-mapping function-mapping function-namelength/function-name function-sqllen(?1)/function-sql /function-mapping function-mapping function-namelocate/function-name function-sqlcharindex(?1, ?2, ?3)/function-sql /function-mapping function-mapping function-nameabs/function-name function-sqlabs(?1)/function-sql /function-mapping function-mapping function-namesqrt/function-name function-sqlsqrt(?1)/function-sql /function-mapping MySQL: function-mapping function-nameconcat/function-name function-sqlconcat(?1, ?2)/function-sql /function-mapping function-mapping function-namesubstring/function-name function-sqlsubstring(?1 FROM ?2 FOR ?3)/function-sql /function-mapping function-mapping function-namelength/function-name function-sqllength(?1)/function-sql /function-mapping function-mapping function-namelocate/function-name function-sqllocate(?1, ?2, ?3)/function-sql /function-mapping function-mapping function-nameabs/function-name function-sqlabs(?1)/function-sql /function-mapping function-mapping function-namesqrt/function-name function-sqlsqrt(?1)/function-sql /function-mapping PostgreSQL: function-mapping function-nameconcat/function-name function-sql(?1 || ?2)/function-sql /function-mapping function-mapping function-namesubstring/function-name function-sqlsubstring(?1 FROM ?2 FOR ?3)/function-sql /function-mapping function-mapping function-namelength/function-name function-sqllength(?1)/function-sql /function-mapping function-mapping function-nameabs/function-name function-sqlabs(?1)/function-sql /function-mapping function-mapping function-namesqrt/function-name function-sqlsqrt(?1)/function-sql /function-mapping ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] SQL function mapping
Nope your right. When I first wrote the function I did not have the + ?3 at the end so it worked fine ... Marco Ladermann wrote: On Monday, 20. August 2001 19:20, Dain Sundstrom wrote: Thanks, checked it in. -dain snip It is simply two functions position(?2 in substring(?1 from ?3))+?3 Sorry for complaining so late, but it is not as simple as this. position( 'findme' , 'wheretolookfor', 3) should be 0 and not 3 or am I wrong? Therefore use this for PostgreSQL: coalesce( nullif( position( ?1 in substring( ?1 from ?3 ) ), ?3 ) + ?3, 0 ) Marco ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Extra ;
Dain in server/src/main/org/jboss/ejb/plugins/cmp/ejbql/Parser.java line 66 you have an extra ';' terminating the return statement. It is causing jikes to complain. Found 1 semantic error compiling /home/dave/jboss/server/src/main/org/jboss/ejb/plugins/cmp/ejbql/Parser.java: [javac] [javac] 66. return (Assembly)completeMatches.iterator().next();; [javac] ^ [javac] *** Error: This statement is unreachable. Could you take it out? Thanks .. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Extra ;
As of 4:14 EST jikes -v Version 1.12 8/1/2000 compile-classes: [mkdir] Created dir: /home/dave/jboss/cluster/output/classes [javac] Compiling 22 source files to /home/dave/jboss/cluster/output/classes [javac] [javac] Issued 1 semantic warning compiling /home/dave/jboss/cluster/src/main/org/jboss/ha/HAConfigNodeImpl.java: [javac] [javac]441. wait (); [javac] - [javac] *** Caution: Ambiguous reference to member named wait inherited from type java/lang/Object but also declared or inherited in the enclosing type org/jboss/ha/HAConfigNodeImpl. Explicit qualification is required. [javac] Compiling 1 source file to /home/dave/jboss/plugins/jetty/output/classes [javac] [javac] Found 1 semantic error compiling /home/dave/jboss/plugins/jetty/src/main/org/jboss/jetty/SetupHandler.java: [javac] [javac] 21. public class SetupHandler [javac] -- [javac] *** Error: The abstract method void handle(java.lang.String $1, com.mortbay.HTTP.HttpRequest $2, com.mortbay.HTTP.HttpResponse $3);, inherited from type com/mortbay/HTTP/Handler/NullHandler, is not implemented in the non-abstract class org/jboss/jetty/SetupHandler. Since the type com/mortbay/HTTP/Handler/NullHandler was read from a class file, it is possible that it just needs to be recompiled because after having inherited method void handle(java.lang.String $1, com.mortbay.HTTP.HttpRequest $2, com.mortbay.HTTP.HttpResponse $3); from an interface, the method was subsequently removed from that interface. But the ';' problem went away ... Jason Dillon wrote: I think it still fails to compile some org.jboss.web.* stuff properly. --jason On Wed, 22 Aug 2001, Dain Sundstrom wrote: Fixed, will commit change as soon as sourcefouge cvs is back on line. Does jikes work compile jboss server now? -dain - Original Message - From: Dave Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 21, 2001 6:44 AM Subject: [JBoss-dev] Extra ; Dain in server/src/main/org/jboss/ejb/plugins/cmp/ejbql/Parser.java line 66 you have an extra ';' terminating the return statement. It is causing jikes to complain. Found 1 semantic error compiling /home/dave/jboss/server/src/main/org/jboss/ejb/plugins/cmp/ejbql/Parser.jav a: [javac] [javac] 66. return (Assembly)completeMatches.iterator().next();; [javac] ^ [javac] *** Error: This statement is unreachable. Could you take it out? Thanks .. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JIKES
If you are uising buildmagic just uncomment the line build.compiler=jikes in local.properties in a build.xml file set the build.compiler=jikes property marc fleury wrote: can someone post the snippet to use jikes as the compiler with ant? sorry for the beginner question.. marcf |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Dain |Sundstrom |Sent: Wednesday, August 22, 2001 4:45 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] Extra ; | | |That's it. Why don't we fix these errors. I think both are Ambiguous class |referances and can be fixed with absolute class referances. We should |atleast try, as jikes is like a billion times faster then javac. Do you |want to take a shot at resolving the errors? (take a look at the jikes docs |for info on resolving the problems) | |-dain | |- Original Message - |From: Dave Smith [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Wednesday, August 22, 2001 3:19 PM |Subject: Re: [JBoss-dev] Extra ; | | | As of 4:14 EST | jikes -v | Version 1.12 8/1/2000 | | | compile-classes: | [mkdir] Created dir: /home/dave/jboss/cluster/output/classes | [javac] Compiling 22 source files to | /home/dave/jboss/cluster/output/classes | [javac] | [javac] Issued 1 semantic warning compiling | /home/dave/jboss/cluster/src/main/org/jboss/ha/HAConfigNodeImpl.java: | [javac] | [javac]441. wait (); | [javac] - | [javac] *** Caution: Ambiguous reference to member named wait | inherited from type java/lang/Object but also declared or inherited in | the enclosing type org/jboss/ha/HAConfigNodeImpl. Explicit | qualification is required. | | | [javac] Compiling 1 source file to | /home/dave/jboss/plugins/jetty/output/classes | [javac] | [javac] Found 1 semantic error compiling | |/home/dave/jboss/plugins/jetty/src/main/org/jboss/jetty/SetupHandl |er.java: | [javac] | [javac] 21. public class SetupHandler | [javac] -- | [javac] *** Error: The abstract method void | handle(java.lang.String $1, com.mortbay.HTTP.HttpRequest $2, | com.mortbay.HTTP.HttpResponse $3);, inherited from type | com/mortbay/HTTP/Handler/NullHandler, is not implemented in the | non-abstract class org/jboss/jetty/SetupHandler. Since the type | com/mortbay/HTTP/Handler/NullHandler was read from a class file, it is | possible that it just needs to be recompiled because after having | inherited method void handle(java.lang.String $1, | com.mortbay.HTTP.HttpRequest $2, com.mortbay.HTTP.HttpResponse $3); | from an interface, the method was subsequently removed from that |interface. | | | | But the ';' problem went away ... | | Jason Dillon wrote: | I think it still fails to compile some org.jboss.web.* stuff properly. | | --jason | | | On Wed, 22 Aug 2001, Dain Sundstrom wrote: | | | Fixed, will commit change as soon as sourcefouge cvs is back on line. | | Does jikes work compile jboss server now? | | -dain | | - Original Message - | From: Dave Smith [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Tuesday, August 21, 2001 6:44 AM | Subject: [JBoss-dev] Extra ; | | | | Dain in server/src/main/org/jboss/ejb/plugins/cmp/ejbql/Parser.java |line | 66 you have an extra ';' terminating the return statement. It is |causing | jikes to complain. | | Found 1 semantic error compiling | | | |/home/dave/jboss/server/src/main/org/jboss/ejb/plugins/cmp/ejbql |/Parser.j |av | a: | | [javac] | [javac] 66. return | (Assembly)completeMatches.iterator().next();; | [javac] | ^ | [javac] *** Error: This statement is unreachable. | | Could you take it out? Thanks .. | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Starting RH errors
Based on the CVS as of Sat 25/19:00 EST .. Why would I be getting a runtime exception starting the ConfigurationService ?? Could not create MBean DefaultDomain:service=Webserver(org.jboss.web.WebService) javax.management.RuntimeErrorException: Error thrown in the MBean's constructor at com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2227) at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:761) at org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:652) at org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:437) at java.lang.reflect.Method.invoke(Native Method) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) at org.jboss.Main.init(Main.java:201) at org.jboss.Main$2.run(Main.java:115) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.Main.main(Main.java:111) The jboss.jcml mbean code=org.jboss.web.WebService name=DefaultDomain:service=Webserver attribute name=Port8083/attribute /mbean ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Small deploy question (RH)
Using the default jboss.jcml file, start jboss with a jar file already in the deploy directory that uses the default data source. It will not deploy. The reason is that the jboss-jdbc.rar is not deployed and therefore there is no default data source. I fixed it by changing the AutoDeployer to look in the deploy/lib before the lib directory. Bug or some other config problem on my side? ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] RE: [JBoss-user] BindException on InstantDB sinceUpgrading to JBoss 2.4 + Tomcat 3.2.3 Package
In the jboss.jcml .. we switched the order the directories are checked deploy/lib deploy in the org.jboss.ejb.AutoDeployer mbean marc fleury wrote: | Actually I find this to be broken as well right now (working on it). If | there is an application in the deploy it will try deploying and |miss because | the rar stuff hasn't kicked in. I think the solution there is probably | making the order of deployment right | | |Jason Fixed this last night are you sure? i don't see a difference in the autodeployer code. I am talking about deploying new rars before you deploy new ears... is that what you are talking about? what do you say has been fixed marcf ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] EJB 2.0 CMP
I am playing with the current sources and testing a 1 to many relationship. I have the following two tables order with pk: int objectid and orderdetail pk: int order_oid,int line_num The link.. order_oid=objectid There is a 1 to many relationship between Order and orderdetail. When you go to access the collection it tries to look up the orderdetail lines with order_oid_objectid. In org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCRelationshipRoleMetaData.java it always appends the the other side of the relationships field to the query fieldname. This does not seem right, if there is another field name that is the forgien key then I should specify it otherwise it should default to the selected field. I guess you would run into problems if the key was a composite and you had to match the two up. Flips through the spec Nope the spec only alllows for 1 field to be the forgein key As aside I can see the next problem coming. Really this collection should be loaded ordered by line_num but there is no way to specify this in the EJB 2.0 spec. (order is not defined) Maybe something for jbosscmp-jdbc.xml? ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] EJB 2.0 CMP
Dain Sundstrom wrote: I am playing with the current sources and testing a 1 to many relationship. I have the following two tables order with pk: int objectid ok and orderdetail pk: int order_oid,int line_num Does order detail have a compund key using both order_oid and line_num? Yes the primary key is order_oid,line_num The link.. order_oid=objectid Ok, foriegn-key style mapping. There is a 1 to many relationship between Order and orderdetail. When you go to access the collection it tries to look up the orderdetail lines with order_oid_objectid. Yep, that is the auto generated foreign key name. The forgein key name is the field name! From the logs ... You generate .. [CMP,DEBUG] FindByForeignKey command executing: SELECT line_number, order_oid FROM orderdetail WHERE order_oid_objectid=? This should be SELECT line_number, order_oid FROM orderdetail WHERE order_oid=? In org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCRelationshipRoleMetaData.java it always appends the the other side of the relationships field to the query fieldname. The goal is to generate a unique field name. the field is unique This does not seem right, if there is another field name that is the forgien key then I should specify it otherwise it should default to the selected field. What do you mean by selected field? I guess you would run into problems if the key was a composite and you had to match the two up. Flips through the spec Nope the spec only alllows for 1 field to be the forgein key What spec? If the parent table has a compound key or a single key field that maps to multiple columns (dependent value class), you will need multiple foreign key fields. No. The forgein key mapping can not be a composite key. It has to be a 1 to 1 mapping (Otherwise how would you map a foreign key, which field goes to which field?) . The primary key can be composite but the foreign keys can not. Here is my relation section relationships ejb-relation ejb-relation-nameOrder-OrderDetail/ejb-relation-name ejb-relationship-role multiplicityMany/multiplicity cascade-delete/ relationship-role-source ejb-nameorderdetail/ejb-name /relationship-role-source cmr-field cmr-field-nametransferhead_oid/cmr-field-name /cmr-field /ejb-relationship-role ejb-relationship-role multiplicityOne/multiplicity relationship-role-source ejb-nameorder/ejb-name /relationship-role-source cmr-field cmr-field-nameorderdetails/cmr-field-name cmr-field-typejava.util.Collection/cmr-field-type /cmr-field /ejb-relationship-role /ejb-relation /relationships ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Compiliing the testsuite
Just a heads up .. I am getting the following warnings .. /home/dave/jboss/testsuite/src/main/org/jboss/test/testbean/test/Main.java:292: warning: assert(java.lang.String,boolean) in junit.framework.Assert has been deprecated assert(statelessMetaData != null, statelessMetaData != null); Over and Over ... ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Rabbit hole
So I pulled the rabbit out of the whole changed jboss.jcml to jboss-services.xml and the bunny ran OK. Only one small furball ... In the classpath declaration I think crimson.jar jaxp.jar need to be ../crimson.jar ../jaxp.jar because they are in lib not lib/ext ... Now back to play with my new bunny ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Compiliing the testsuite
Chris Kimpton wrote: Hi, --- Dave Smith [EMAIL PROTECTED] wrote: Just a heads up .. I am getting the following warnings .. /home/dave/jboss/testsuite/src/main/org/jboss/test/testbean/test/Main.java:292: warning: assert(java.lang.String,boolean) in junit.framework.Assert has been deprecated assert(statelessMetaData != null, statelessMetaData != null); Over and Over ... Are you just compiling the testsuite directory? I am using the latest CVS and it seems to work for me when built/run with the command build.sh testsuite in the jboss-all/build directory. Chris Well I was trying it from just the normal complete build , but If I just build the testsuite I get the same problem. Maybe you a different version of junit? ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Compiliing the testsuite
blackdown 1.3 linux redhat 6.2. This is with the CVS as of 8:00 EST. Chris Kimpton wrote: Hi, Well I was trying it from just the normal complete build , but If I just build the testsuite I get the same problem. Maybe you a different version of junit? Nope - just using the one that comes with jboss. What platform are you on? I am using IBM jdk 1.3 on linux redhat 7.1? Chris = Need somewhere to Live in London - http://freeflats.com __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Rabbit hole
marc fleury wrote: |In the classpath declaration I think | |crimson.jar |jaxp.jar | |need to be |../crimson.jar |../jaxp.jar they are referenced through run.mf Ok I see that. When I built it thats where they went. So do these classes have to be present in order for jboss to load over the network? If yes then should I change run.mf to ../lib/ext or do I remove them from the jboss-service.xml classpath? ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Rabbit hole
marc fleury wrote: |Ok I see that. When I built it thats where they went. So do these |classes have to be present in order for jboss to load over the network? |If yes then should I change run.mf to ../lib/ext or do I remove them |from the jboss-service.xml classpath? The jaxp stuff is buggy with CL and it needs the local path stuff right now. I talked to their developer a couple of days ago (SUN kiddy, wouldn't cut it a day here ;) and they say the new version on apache fixes that. Same with log4j (g!) same ol' sun... don't know jack! lib/ext libraries are those loaded over the network. The ones we are talking about need to be present (the ones in lib). I think we could rename it /lib/boot and lib/services to be more explicit, I think lib/ext is confusing to many people. The jboss-service.xml should not reference lib/ stuff and if you don't specify a codebase it points to http/file://yourinstall/lib/ext... we could move that to yourinstall/lib/services what do you say? marcf So the upshot is ..for a network load you still need those three jars locally becuase they do not want to play nice with the CL. Go with the lib/boot and lib/services. I'm assuming once those jars are CL safe thenwe can move the jars from boot to services and remove boot. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB 2.0 CMP
Dain Sundstrom wrote: Dave, After reviewing these comments I think we are making this way more complicated than it has to be. As far as I am concerned we should only need the relationship stuff in jbosscmp-jdbc.xml for relationships that use a relation table (ex. self relation employee/manager, just to control the name and fields ) or for primary keys that are composite. Relax. The only reason you need the jbosscmp-jdbc.xml file is that you are tiring to exactly specify the foreign key field. If you just let the system define the foreign key field for you, you would not have any problems. I have a test case that closely matches what you have coded except my case uses a general oid for the line item and the order fk is auto generated. Ahh... lights on. Is this how the majority of end users are going to use this? It would seem within a larger shop the people doing the data modeling are not the people building the J2EE apps. I would think that the data modeling or db's would say here are the tables build your objects. I know it's not *object oriented* but we should code for the masses. Time Passes So let me understand the order case above. Would the database schemas look like this? create table order ( objectid int default nextval('some sequence') primary key, other fields ... ); create table order_detail ( objectid int default nextval('some sequence') primary key, order_oid int references order, line_numint other fields ... ); Still having a hard time why you have to auto generate fk fields for this case. It would seem this is what a dba would give you ... and if the order/order_detail objects had all of the fields above nothing to generate? I think that your code is handling all of the difficult cases and is ramming the easy ones into it. We really should have a waterfall type style where we assume that it is the simple case and then have the program add what's missing or have the user define it. We should avoid creating tables if all possible. I would see only 3 cases where you need a third table Many to Many 1 to Many (unidirectional. I can not come up with an example but it would be valid) Self referencing entry A relation table is only required for a many-to-many relationship. A unidirectional many-to-one relationship can always use foreign keys. The trick is that the database mapping of the relationship does not have to match the object level navigability. A self-referencing entity can also use a foreign key to itself. Time passes ... I'm am really trying hard to not have to use this jboss-jdbc.xml ... For composite foreign keys would could also the jdbc method getImportedKeys() to figure out composite keys. This would mean the jdbc driver would have to support the DatabaseMetaData method and the dba would have to use the references in their table definition. We could always fall back to the xml file if it did not exsist. So with a good jdbc driver we really would only have to create an xml entry if we had a specfic relation table we had already predefined. This is a good idea but, would only work if there were only a single relationship between the two entities. The problem is that it is very common for entities to have multiple relationships. For example, order has a shipping address and a billing address. So what. There are two foriegn keys on a table. Could be hundreds .. still do not see the problem. Let me check out getImportedKeys , I'll get back to you .. Maybe I'm foaming at the mouth, but I feel this is a HUGE feature for people writing business apps and it should be as simple as possible. I really think this could be simpler for the developers and users. I agree. It think the configuration is very complicated. I was thinking of writing a took that could generate the jbosscmp-jdbc.xml file based on the system defaults. Then the user could modify the default configuration. This utility could also read in the current config and fill in the unspecified options. Something like this or a gui could make configuration very easy. Have I missed something? Do you have a counter point or suggestion? As a side note, I am happy to see someone challenging my design decisions. I have been known to be full of it (and my self). Please keep the criticism up, and don't worry about ticking me off (it takes a lot). Thanks a lot, -dain I think a database schema of your case would help my understanding. I still believe there is overkill for the simple cases which will be the majority of cases. This is something that many business aps will use and I in my day have written tons of this collection handling shit and it would be nice to get it right once and for all. Writting is not my strong point , so I'm not trying to be cruft just trying to make JBOSS better. Tear in my eye ... beatles songs running
[JBoss-dev] EJB playing with finders
I am trying a simple home method with a query Home method public java.util.Collection findByInQueue() throws java.rmi.RemoteException,javax.ejb.FinderException; ejb-jar.xml snippit query ejb-qlselect object(t) from transferhead t where status=' '/ejb-ql query-method method-namefindByInQueue/method-name method-params /method-params /query-method result-type-mappingRemote/result-type-mapping /query Now there are two problems 1) [CMP,DEBUG] Finder: inQueue [CMP,DEBUG] Could not create the finder findByInQueue, because no matching CMP field was found. there are no arguments, just run it. 2) Now actually call the homemethod and I get findByInQueue command executing: SELECT t1_t.objectid FROM Transferhead t1_t Which politly returns all of them. Should it not throw an error or at least not return anything? ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB 2.0 CMP
Sorry if this is posted twice! Dain Sundstrom wrote: Dave, After reviewing these comments I think we are making this way more complicated than it has to be. As far as I am concerned we should only need the relationship stuff in jbosscmp-jdbc.xml for relationships that use a relation table (ex. self relation employee/manager, just to control the name and fields ) or for primary keys that are composite. Relax. The only reason you need the jbosscmp-jdbc.xml file is that you are tiring to exactly specify the foreign key field. If you just let the system define the foreign key field for you, you would not have any problems. I have a test case that closely matches what you have coded except my case uses a general oid for the line item and the order fk is auto generated. Ahh... lights on. Is this how the majority of end users are going to use this? It would seem within a larger shop the people doing the data modeling are not the people building the J2EE apps. I would think that the data modeling or db's would say here are the tables build your objects. I know it's not *object oriented* but we should code for the masses. Time Passes So let me understand the order case above. Would the database schemas look like this? create table order ( objectid int default nextval('some sequence') primary key, other fields ... ); create table order_detail ( objectid int default nextval('some sequence') primary key, order_oid int references order, line_numint other fields ... ); Still having a hard time why you have to auto generate fk fields for this case. It would seem this is what a dba would give you ... and if the order/order_detail objects had all of the fields above nothing to generate? I think that your code is handling all of the difficult cases and is ramming the easy ones into it. We really should have a waterfall type style where we assume that it is the simple case and then have the program add what's missing or have the user define it. We should avoid creating tables if all possible. I would see only 3 cases where you need a third table Many to Many 1 to Many (unidirectional. I can not come up with an example but it would be valid) Self referencing entry A relation table is only required for a many-to-many relationship. A unidirectional many-to-one relationship can always use foreign keys. The trick is that the database mapping of the relationship does not have to match the object level navigability. A self-referencing entity can also use a foreign key to itself. Time passes ... I'm am really trying hard to not have to use this jboss-jdbc.xml ... For composite foreign keys would could also the jdbc method getImportedKeys() to figure out composite keys. This would mean the jdbc driver would have to support the DatabaseMetaData method and the dba would have to use the references in their table definition. We could always fall back to the xml file if it did not exsist. So with a good jdbc driver we really would only have to create an xml entry if we had a specfic relation table we had already predefined. This is a good idea but, would only work if there were only a single relationship between the two entities. The problem is that it is very common for entities to have multiple relationships. For example, order has a shipping address and a billing address. So what. There are two foriegn keys on a table. Could be hundreds .. still do not see the problem. Let me check out getImportedKeys , I'll get back to you .. Maybe I'm foaming at the mouth, but I feel this is a HUGE feature for people writing business apps and it should be as simple as possible. I really think this could be simpler for the developers and users. I agree. It think the configuration is very complicated. I was thinking of writing a took that could generate the jbosscmp-jdbc.xml file based on the system defaults. Then the user could modify the default configuration. This utility could also read in the current config and fill in the unspecified options. Something like this or a gui could make configuration very easy. Have I missed something? Do you have a counter point or suggestion? As a side note, I am happy to see someone challenging my design decisions. I have been known to be full of it (and my self). Please keep the criticism up, and don't worry about ticking me off (it takes a lot). Thanks a lot, -dain I think a database schema of your case would help my understanding. I still believe there is overkill for the simple cases which will be the majority of cases. This is something that many business aps will use and I in my day have written tons of this collection handling shit and it would be nice to get it right once and for all. Writting is not my strong point , so I'm not trying to be cruft just
Re: [JBoss-dev] EJB playing with finders
No cigar ... [CMP,DEBUG] EQL-QL: select object(t) from transferhead t where t.status=' ' [CMP,DEBUG] java.lang.IndexOutOfBoundsException: Index: -1, Size: 0 [CMP,DEBUG] at java.util.ArrayList.RangeCheck(ArrayList.java:491) [CMP,DEBUG] at java.util.ArrayList.remove(ArrayList.java:375) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Assembly.pop(Assembly.java:55) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.jdbc.ejbql.EJBQLParser$5.workOn(EJBQLParser.java:250) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Parser.matchAndAssemble(Parser.java:22) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Optional.match(Optional.java:14) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Parser.matchAndAssemble(Parser.java:14) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Sequence.match(Sequence.java:25) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Parser.matchAndAssemble(Parser.java:14) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.ejbql.Parser.soleMatch(Parser.java:48) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLFinderCommand.init(JDBCEJBQLFinderCommand.java:54) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLFinderCommand(JDBCCommandFactory.java:100) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.start(JDBCFindEntitiesCommand.java:89) [CMP,DEBUG] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:94) [CMP,DEBUG] at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:169) [CMP,DEBUG] at org.jboss.ejb.EntityContainer.start(EntityContainer.java:355) [CMP,DEBUG] at org.jboss.ejb.Application.start(Application.java:213) [CMP,DEBUG] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:384) [CMP,DEBUG] at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:308) [CMP,DEBUG] at java.lang.reflect.Method.invoke(Native Method) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [CMP,DEBUG] at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:492) [CMP,DEBUG] at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:470) [CMP,DEBUG] at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:209) [CMP,DEBUG] at java.lang.reflect.Method.invoke(Native Method) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [CMP,DEBUG] at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:437) [CMP,DEBUG] at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:221) [CMP,DEBUG] at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:362) [CMP,DEBUG] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:109) [CMP,DEBUG] at java.lang.reflect.Method.invoke(Native Method) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [CMP,DEBUG] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:506) [CMP,DEBUG] at $Proxy0.start(Unknown Source) [CMP,DEBUG] at org.jboss.system.ServiceController.deploy(ServiceController.java:138) [CMP,DEBUG] at java.lang.reflect.Method.invoke(Native Method) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) [CMP,DEBUG] at org.jboss.deployment.ServiceDeployer.postRegister(ServiceDeployer.java:405) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.postRegisterInvoker(MBeanServerImpl.java:2274) [CMP,DEBUG] at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:532) [CMP,DEBUG] at org.jboss.Main.init(Main.java:231) [CMP,DEBUG] at org.jboss.Main$1.run(Main.java:134) [CMP,DEBUG] at java.security.AccessController.doPrivileged(Native Method) [CMP,DEBUG] at org.jboss.Main.main(Main.java:130) Dain Sundstrom wrote: Right now there is no error handling in the ejb-ql parser. The problem with your ejb-ql is you have status when you should have t.status. It should work then, -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, August 31, 2001 8:12 AM To: [EMAIL PROTECTED] Subject: [JBoss-dev] EJB playing with finders I am trying a simple home method with a query Home method public java.util.Collection findByInQueue() throws java.rmi.RemoteException,javax.ejb.FinderException; ejb-jar.xml snippit query ejb-qlselect object(t) from transferhead t where status=' '/ejb-ql query-method method-namefindByInQueue/method-name method-params /method-params /query
Re: [JBoss-dev] EJB 2.0 CMP
Got it now ... but it is still not seeing eye to eye ... comments below .. Dain Sundstrom wrote: Dave, We still don't see eye-to-eye, and I think I made the problem worse with my example. I think the most common type of relationship will be something like 'a cd has an artist' or 'a cd has a publisher.' In this cases, the foreign key for the artist or publisher would be just another column in the cd table. So we would have something like: String idbn pk String title ... Oid cd_artist fk Oid cd_publisher fk The oid is a place holder for what ever the pk for cd and artist (don't let it confuse you). I will argue that this is the most common relationship type and is auto created by the system. Sure, Oid could be artist number, name Now your mapping is very different from what we have above. Your mapping mapps a foreign key to one of the pk columns (multi-key). This is a very difficult mapping because of the way the cmp engine is architected. The CMP engine is field oriented as apposed to column oriented. A field can map to multiple columns (a feature that existed in jaws). Follow so far? Not a good database practice to have one field name map to multiple database columns, but you have to support it. I would suggest though most IDE's would map 1 column in the database to 1 field in the entity and that case should be the rule, not the exception. Now each entity is composed of a collection of cmp field field objects and a collection of foreign key fields (or relation table key fields). I'm only going to address foreign key fields here. When the system starts it initializes the cmp fields for every entity. After that is complete it initializes the relationships. For each cmr field in an entity, it locates the related entity and creates a set of foreign-keys that are a copy of the related entitie's pk field(s). Still with me? I'm with you but I think this is the rub. Why are we creating a copy of the related keys? Since you alredy have to create the actual implementation of the data for the entity bean, you must have code to map setfield and getfield calls into a set/retrive data out of the entity. Why not map the reference in the foreign key object to the entiy field and then just get it when you need it? Do they both not have to be in sync at all times anyway? The problem you mapping presents is you want to use a field for both an entity cmp and a relation foreign key field. In the current code these fields are different object. The caching code is also field oriented, so you would end up with two distinct caches of the code. Which could be a big problem. See above. Ok let's take a step back and examine the mapping from the spec perspecitve. Using a pk field as a relationship foreign key presents a problem because the spec requres that a pk never change after ejbCreate but also requires that a relationship can not be set until ejbPostCreate. This leads to the question, how exactly are you going to set the relationship? Any way, I don't think any of the above text is that important. Although I think what you ask will make your code not spec compliant, I also think this type of mapping is important. I will look into adding support for this type of mapping, but it won't happen soon. I am focusing on the features required for spec compliance. Then I am going to add performance enhancements. And finally additional features. Yup, thats a problem. Looks like we would have to use 10.8.3 to get around it. I would not have a problem sticking in an primary key oid to get around it but it is just extra table space. I would agree though that unless it is easy to implement this would be a low priority. Ok that was a lot of babble. I need to stop writting emails before I get my first cup of coffee. Oh, you just must be so excited when you get my e-mails you just have to type! Not bad babbling without caffeine ! -dain dave ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] EJB/QL - JBoss extentions
Well after doing some paying work I'm back to looking at and testing the new EJB 2.0 query methods. I have taken my current application (not written in EJB) and tried to convert some of it into EJB. I have come across the following problems/holes in the EJB/QL spec. Below is a summary of the key problems with examples. If I'm way off base please say so! 1. No order clause. Well ... this is obvious and I have not tested the current stuff to see if Dain put it in. 2. No limit/offset or cursors. In a word searches. If you are tring to search for something you display a list of current values based on a selection criteria. What happens when the list is 100,000 records. With current DB code you would declare a cursor or use offset and limits and only retreive a bit at a time. 3. Dynamic where clause Prompting the user for a search criteria and returning a result set based on those criteria. Also would be handy to have cursors/limit. 4. database functions If I am doing a query on a datestamp type field but I only care about the date part, in postgresql I need to use a postgresql function that only returns the date. For 1,3,4 I would propose that we add a special jboss function into the QL, something like jboss_sql_inline() and what is between the brackets is just passed through to the sql engine. Arguments could be passed through to parts of the code with ??1 etc, sort of an escaped argument. So you could have select object(o) from foo o where o.id=?1 and jboss_sql_inline(datefunc(datefield) = ??2) For option 2 could we not extend the Collection type that we return to not only do dynamic object creation but also dynamic lookup, so you would do the query return an empty collection with a handle back to the query. Once the collection was accessed then the requested element would be retreived. I beleive this would have to be a read-only list because if the object is not loaded it can not be locked. This would not be much of a drawback becuase for searches it is usally read only and then the users selects an object he wishes to modify/or view the object is locked. I'm willing to put some time into this. (ie coding) Comments? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB/QL - JBoss extentions
Close, but what if my initial list is 1 million records. That means that you still have to load and create 1 million pk's. I think you need to define the query and return the list. When the Collection asks for the next record or record # 10 then you not only need to load the record but also the pk. Oleg Nitz wrote: Hi, Yes, I am working on this. Here is the algorithm. The list of PK values are loaded at first and stored to LRU cache of query results on server, the id of the list is passed to client. When client requests some CMP field, the list id and index in the list of the given entity is passed to server. Next N entities are loaded from DB (SQL statement has the form SELECT ... WHERE pk=? OR pk=? ...) and returned to client. When client requests the same CMP field for next N entities, no interaction with with server is done to serve this request. Oleg Peter Fagerlund wrote: on 1-09-24 05.36, Dain Sundstrom at [EMAIL PROTECTED] wrote: Maybe I am stupid, but I have have no idea what this means. I do not think so ! ... it is me being unclear -perhaps ... -this means, A pattern is great, and especially so, if there is a good implementation template I can use, and customise for my application ... A page_by_page_iterator should have an idee of the amount of records it is capeble to display for its user -say 100.000.000 -when a user request a list s/he should get a list of some -then perhaps the implementation prefetch some more data in close perimeter to where in the index the user is navigating ... -get metadata -fetch some data to list - display the list -prefetch some more -wait for new input Also a centralised cache for all users of the iterator -that can act according to how static the data is ... would help ... A page_by_page_iterator for really large datasets would work best in tandem with a lighter db that has a prebuilt index ! ... /peter_f ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB/QL - JBoss extentions
Keep the result set open, retieve from the set as necessary, probably using a cursor. That way if someone is doing a search that has 1 million records and after I display the first 10 and the client chooses the 3rd one, we have only created 10 objects. Oleg Nitz wrote: Dave Smith wrote: Close, but what if my initial list is 1 million records. That means that you still have to load and create 1 million pk's. I think you need to define the query and return the list. When the Collection asks for the next record or record # 10 then you not only need to load the record but also the pk. Sorry, I don't understand your idea. Do you propose to keep the ResultSet open? Do you mean using SQL extensions like LIMIT clause? Oleg Oleg Nitz wrote: Hi, Yes, I am working on this. Here is the algorithm. The list of PK values are loaded at first and stored to LRU cache of query results on server, the id of the list is passed to client. When client requests some CMP field, the list id and index in the list of the given entity is passed to server. Next N entities are loaded from DB (SQL statement has the form SELECT ... WHERE pk=? OR pk=? ...) and returned to client. When client requests the same CMP field for next N entities, no interaction with with server is done to serve this request. Oleg Peter Fagerlund wrote: on 1-09-24 05.36, Dain Sundstrom at [EMAIL PROTECTED] wrote: Maybe I am stupid, but I have have no idea what this means. I do not think so ! ... it is me being unclear -perhaps ... -this means, A pattern is great, and especially so, if there is a good implementation template I can use, and customise for my application ... A page_by_page_iterator should have an idee of the amount of records it is capeble to display for its user -say 100.000.000 -when a user request a list s/he should get a list of some -then perhaps the implementation prefetch some more data in close perimeter to where in the index the user is navigating ... -get metadata -fetch some data to list - display the list -prefetch some more -wait for new input Also a centralised cache for all users of the iterator -that can act according to how static the data is ... would help ... A page_by_page_iterator for really large datasets would work best in tandem with a lighter db that has a prebuilt index ! ... /peter_f ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB/QL - JBoss extentions
As normal dain converts my ramblings into good ideas .. Comments below .. I suggest that we add an order element to the query section in jbosscmp-jdbc.xml file. Something like query descriptionFind all orders with the specified status/description query-method method-namefindWithStatus/method-name method-params method-paramjava.lang.String/method-param /method-params /query-method ejb-ql orderORDER_NUMBER/order /ejb-ql /query Note the order element would contain the exact sql that would appear in the order clause. I think that we should require the user to use the sql column names and not support a bean level field ordering. The reason being that it would be difficult to determine how multi column fields would be ordered, and it also allows the user to order by column that are not mapped. Cool . 4. database functions If I am doing a query on a datestamp type field but I only care about the date part, in postgresql I need to use a postgresql function that only returns the date. Date handling is EJB-QL sucks. Here is how you can do it myRef.date = ?1 and myRef.date ?2 Then pass in the day and the next day. The big benefit is its spec compliant. Bad example on my part. I think thought what is stated below will cover it. I don't recommend this. It would make the query engine much more difficult then it needs to be. Just off the top of my head how does this fit into the EJB-QL BNF? What is the type of a jboss_sql_inline function? What is the precedence? What is the allowed text inside of the function? Are path statements allowed? Are parameters allowed? How do we escape things that look like parameters or path statements if allowed? I have been thinking about statements like this for a while, and I think I have a solution that every one will like. I think the real goal is to allow much more complex queries then can be generated from ejb-ql, and to allow optimized queries (hinting). I think the best way is to support raw-sql queries. A raw-sql query would have the following properties: * allow any sql statement * hand mapping of results from selected columns * internal state of parameters may be used I am thinking of an xml spec that is something like query descriptionCount orders with same status as the specified order/description query-method method-nameejbSelectStatusCount/method-name method-params method-paramorg.foo.bar.Order/method-param /method-params /query-method raw-sql sql SELECT COUNT(order_id) FROM order WHERE status = ?1.status /sql results-map ordinal1/ordinal /results-map /raw-sql /query The results-map would have to be much more complicated to support multi-column pk keys and eager loading. The biggest problem with this solution is the raw-sql specification could be very difficult, so to go with this spec we would supply a tool that takes the current ejb-jar.xml (especially the ejb-ql section) and jbosscmp-jdbc.xml files and generates a new jboss-cmp.xml file with all of the ejb-ql statements converted to raw-sql queries. This is part of a tool set that I would like to write to help with the optimization process. It also do things like fill in all of the default mappings of tables. Any way, I think this would allow people who need advanced db features to do whatever they want, and allows us to keep the ejb-ql parser spec compliant. Also it would not be that difficult to implement, because the xml structure is similar to how the internal structure of queries are implemented in the engine. I hope all of this is intelligible. Yup, this is the way to do it. All extra stuff should be in the .xml config file. So with the above syntax for my own queries why not query descriptionMy own hard coded where clause /description query-method method-nameejbMyQuery/method-name method-params method-paramjava.lang.String/method-param /method-params /query-method raw-sql sql SELECT * FROM my_table WHERE ?1 /sql results-map ordinalMany/ordinal return_typeorg.foo.bar.MyTable/return_type /results-map /raw-sql /query As far as generating another file with optimized queries I think this is overkill, confusing and not necessary. With most databases the query optimizations are done at the sql level why not just use the above for queries that need to be optimized. For the
Re: [JBoss-dev] EJB/QL - JBoss extentions
Oleg Nitz wrote: Dave Smith wrote: Keep the result set open, retieve from the set as necessary, probably using a cursor. That way if someone is doing a search that has 1 million records and after I display the first 10 and the client chooses the 3rd one, we have only created 10 objects. No, no, no! We can't keep the result set open! 1) having open result set and open Connection for each client, we'll end up with too many open connections and too many open result sets (256 open cursors by default in Oracle). Well then use limit and offset, but a cursor will be more efficient. I think what you have done is fine as the default case, so I see this fuctionality as an *option* not the default. Currently it is only doing searches that I would want this functionallity not anywhere else. 2) How about transaction bounds? Can you keep cursor open after transaction ends? I don't think so. As stated previously this case has to be read-only, and would have to live within it's own transaction, or you are stuck with limit and offset. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB/QL - JBoss extentions
Ok, so 20 or so e-mails later the summary .. 1) Right now if I want to use order I have to use declared-sql with an order by clause but dain wants to add an order tag to the xml config file. 2) For dynamic queries I just use declared-sql and do my normal SQL query. This could also be used if I had some strange SQL functions that needed to be called. 3) For only retreiving a partial list I'll have to use the limit and offset options in delcared-sql and then write some sort of wrapper object that keeps track of the current offset in the table as well as a limit size. So, I'll take my declared-sql and crawl back under the rock I came from. Dave Dain Sundstrom wrote: The example you have given can be done today with declared-sql. Declared-sql is designed to satify 95% of the cases. The other 5% are very important and should be addressed. I most large applications there are a few queries that must be hand optimized, and it would be nice to do this declarativly. Additionally, there are several features in standard sql that are not available in ejb-ql, such as group-by. I think this is important but not critical, and that is why I have not started working on it. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] EJB/QL - JBoss extentions
See below .. Ignacio Coloma wrote: Dave Smith wrote: Keep the result set open, retieve from the set as necessary, probably using a cursor. That way if someone is doing a search that has 1 million records and after I display the first 10 and the client chooses the 3rd one, we have only created 10 objects. No, no, no! We can't keep the result set open! 1) having open result set and open Connection for each client, we'll end up with too many open connections and too many open result sets (256 open cursors by default in Oracle). 2) How about transaction bounds? Can you keep cursor open after transaction ends? I don't think so. What about making an automatic paging? Think about something LIKE an open cursor. I'll try to be brief. Suppose this query to return 1,000,000 records: SELECT ID, NAME FROM TABLE ORDER BY NAME; Suppose that you make a PagedCollection (configurable from jbosscmp-jdbc.xml) that only get the first 50 records (and you close the resultset). You show them. When someone tries to get the #51 record and so you make another call (possibly in another new Transaction context) SELECT ID, NAME FROM TABLE WHERE ID #the ID of record 50# ORDER BY NAME; Unfortunately the list is ordered by a field other than the primary key so if you had a list like .. pk name 3 Fleury 2 Smith 1 Sundstrom and your last record in the current list was Fleury you would get end of list not Smith. You need to use limit and offset So the first time SELECT ID, NAME FROM TABLE ORDER BY NAME limit 50; And after .. SELECT ID, NAME FROM TABLE ORDER BY NAME limit 50 offset 51; A cursor is ideal but it would have to be read-only and you would have to keep it in is own transaction outside the current one. And so on. It would be more effective than any solution the programmer could make by hand. Are there Transaction consecuences on this? I could be missing something. My 2c. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Raw-sql
I am trying to use the raw-sql feature of jbosscmp-jdbc.xml. Now as far as I can see it looks like it is not implemented. The JDBCRawSqlQueryMetaData does not store the query in the .xml file only the method. The JDBCFindEntitiesCommand only checks for JDBCDeclaredQueryMetaData,,JDBCQlQueryMetaData types as known finders. I am assuming that you would specify raw-sql and then pass in the sql command you with to execute as the only argument to the finder method. It does not look that hard to add, extend JDBCFinderCommand, add an entry in JDBCFindEntitiesCommand and a Factory method in JDBCCommandFactory. I could do it this weekend or am I way off base here? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Raw-sql
Dain Sundstrom wrote: There are to things that are hard. T he first is mapping the output columns to the result object. This is complicated by the fact that a cmp field can map to more then one column. You will have to add error handling to assure that all of the properties of a field are loaded. I don't think my helper methods will work because they assume a certain order to the columns (the helpers create both the queries and the load the results). Agreed. The second one is somewhat related. Since a field (really an object type / class) maps to more then one column you will have an issue with query input parameters. I suggest something like ?1.prop.prop (more like ejb-ql) or {1.prop.prop} (I like this one, more like old jaws style, easier to parse). I was going to write some helpers to extract properties based on a doted structure, but haven't gotten to it yet. Hmmm.. I was thinking that you would pass the whole sql command through, execute it as is and then grab the metadata for the result set and then try and fill the object. The problem with properties is when you are doing dynamic queries you don't know how many input parameters you are dealing with. If your input parameters are static then could you not use delared-sql ? So given that there are 48-60 hours in a weekend it is doable, but I would shoot for 2 weekends. One to get the results half and the other for parameters. Ouch... Love a challenge though ... -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, October 19, 2001 3:57 PM To: [EMAIL PROTECTED] Subject: [JBoss-dev] Raw-sql I am trying to use the raw-sql feature of jbosscmp-jdbc.xml. Now as far as I can see it looks like it is not implemented. The JDBCRawSqlQueryMetaData does not store the query in the .xml file only the method. The JDBCFindEntitiesCommand only checks for JDBCDeclaredQueryMetaData,,JDBCQlQueryMetaData types as known finders. I am assuming that you would specify raw-sql and then pass in the sql command you with to execute as the only argument to the finder method. It does not look that hard to add, extend JDBCFinderCommand, add an entry in JDBCFindEntitiesCommand and a Factory method in JDBCCommandFactory. I could do it this weekend or am I way off base here? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Update on ASPLoginModule - cancelled
I'm assuming the properties based Principle would allow you to call sessionContext.getCallerPrincipal() and then retreive certain properties like companyId, branchId etc If you wanted to get this stuff out of the Database would you just not have to extend DatabaseServerLoginModule and instead of creating a SimplePrincipal have a PropertiesPrincipal with an addional method getProperty? There would be no need for an addional Callback because you are still only getting login and password. OverSimplification? Steve Salkin wrote: Hi- After posting here to see if there was interest in a generic version of LoginModule similar to the UsernamePasswordLoginModule, but which supported a third passed-in attribute Organization for ASP models, I had an interesting dialog with JAAS expert Scott Stark. Since our conversation seems to have petered out, I'd like to make some elements part of the public record so they don't get forgotten, and will be accessable to people coming along later who are a situation similar to mine. Scott, I hope you don't mind my quoting some of your technical remarks rather than rephrasing them just to avoid this. After a brief confusion at the outset, Scott realized that I was trying to ask the user for two separate pieces of information to uniquely identify them. I explained that I was planning to add another CallbackHandler and another Principal implementation to facilitate this. He said: Ok, I see the issue. However, when a login module is executed on the server in response to either an attempt to access an ejb or a servlet, there is no callback handler to which the request can be delegated. An extension to the current security manager would have to be made to allow one to configure a callback handler for a security domain. Also, the next logical step would be to have a properties based principal and callback object that allowed one to associate any number of attributes with a principal. The ASP use case is one that just uses a single organization property. Adding this as well as externalizing the callback handler for a security domain makes sense to me. As I said to him, this is more work than I probably have time to do right now, given the other deadlines I am facing, and it seems unlikely to me that this would be a good first project for a new jboss developer even if I did. Perhaps I will be able to contribute to the project in some way at a later time. In any event, since I am writing here I'd like to thank each of you for the amazing work that has gone into jboss, which I have followed for some time. May it bring you all fame and fortune. S- ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JVM crash on linux
I foudn that starting the jvm with -hotspot instead of server helped me. Ferguson, Doug wrote: We had some problems on linux with a runaway java process. The process hangs at 99% and cannot be stopped. We found out that it has to do will file io. We can even recreate it with perl. We have a perl script that can recreate this. If you want we can send you the perl script for further testing. Cheers, d. -Original Message- From: Bill Burke [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 03, 2001 6:09 PM To: Tobias Frech Cc: Dain Sundstrom; [EMAIL PROTECTED] Subject: RE: [JBoss-dev] JVM crash on linux ulimit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tobias Frech Sent: Saturday, November 03, 2001 6:40 PM To: Bill Burke Cc: Dain Sundstrom; [EMAIL PROTECTED] Subject: Re: [JBoss-dev] JVM crash on linux Increasing the shell limits (especially stacksize) helped me a lot with some crasheing JVM. I am actually sitting at a NT box (*sic*) and can't remember the correct command (limit ?). Tobi Bill Burke schrieb: I've had serious problems on linux with JDK 1.3.1 Stuff like runaway memory gobbling and such. We had to revert to 1.3.02. Don't know if there is a patch posted recently though. Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dain Sundstrom Sent: Saturday, November 03, 2001 5:45 PM To: [EMAIL PROTECTED] Subject: [JBoss-dev] JVM crash on linux I remember seeing some posts about JVM crashes on linux, but don't remember if it was ever resolved. I am fairly regularly getting a crash with the RH server. I just restart the server, and the test run fine. I get a bunch or internal info then. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
Dain Sundstrom wrote: OK i'm playing with the latest RH CVS and testing out 1 to many relations (bi directional). So .. Table1 { primary_key int, } TableMany { primary_key int, table1_key int, } class Table1 { int getPrimary_key() Collection getTableMany(); } class TableMany { int getPrimary_key(); int getTable1_key(); } the problem is that when it tries to fetch TableMany it looks for a field called table1_key_primary_key. It would seem that the default key should not be made up but the foreign key of the other side of the relationship. So line 80 of JDBCRelationshipRoleMetaData.java should just be tempCmrFieldName = relatedRole.getEntityName(); 1. Defaults can be overridden. This is the default case. The strange cases should be overridden. Read Marc's bit about packaging. 2. What happens when you have two one-to-many relationships between Table1 and TableMany? Doesn't matter you still need Table1's primary key in TableMany. So you would have Table1 { Collection getTableMany(); Collectiont getTableMany2(); } TableMany { int getTable1_key(); int getTable2_2_key(); } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
When it tries to load the CDTrack relation it generates the following sql statement .. select uuid from CDTrack where composer_composed_songs=? should be .. select uuid from CDTrack where composer=? Dain Sundstrom wrote: I'm using xdoclet to generate the ejb-jar.xml file. When you are generating the accessor methods it automaticly assumes that the accessor name matches the database column name. So in your example by default it is looking for a database columns named composer and performer. This is a packaging issue, ie how much work and how confusing is it to generate the ejb-jar.xml files. From my point of view I think that the simplist case is that each database column has a matching get/set method . So in xdoclet .. Musician { String name; // pk /** @ejb:persist-field @ejb:relation name=songs_composer */ Collection getComposedSongs(); } CDTrack { String uuid; // pk /** @ejb:persist-field @ejb:relation name=songs_composer */ Musician getComposer(); } Generates ejb-relation ejb-relation-namesongs_composer/ejb-relation-name ejb-relationship-role multiplicityMany/multiplicity relationship-role-source ejb-nameCDTrack/ejb-name /relationship-role-source cmr-field cmr-field-namecomposer/cmr-field-name /cmr-field /ejb-relationship-role ejb-relationship-role multiplicityOne/multiplicity relationship-role-source ejb-nameMusician/ejb-name /relationship-role-source cmr-field cmr-field-nameCDTrack/cmr-field-name cmr-field-typejava.util.Collection/cmr-field-type /cmr-field /ejb-relationship-role /ejb-relation Tables .. Musician { String name; } CDTrack { String uuid; String composer; } Got it? So what is the problem? Table mapping is an implementation detail. Does the above not deploy? Is ejb-doclet generating bad ddl? -dain ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
Finally, we are on the same page ..not even a blue moon ... Yup this is a suggestion. I agree 100% we need to avoid using jbosscmp-jdbc.xml. Ulitmately at the database level for each table there has to be a unique column name(s) that acts as a foreign key for the relation. It also can only participate in 1 relation. For a many to many relationship with a mapping table could be a problem if the field name on both sides of the relationship were the same. But I would see this as an exception not the rule. For self joins you would have to do like you do in the EJBQL and prefix the column with the table name. Not a bad idea for all relations so select uuid from CDTrack where composer=? would be select c.uuid from CDTrack as c where c.composer=? Dain Sundstrom wrote: Ok stop for a second. Do you have a jbosscmp-jdbc.xml file that specifies the relationship should be mapped to a foreign key field named composer? If yes, then this is a bug. If no, then this is a suggestion. If it is a suggestion, say so, and I will consider it. My main goal when creating column names it to always allow an ejb jar to deploy without requiring a jbosscmp-jdbc.xml file. When explaining the suggestion explain why you would not get a name collision. -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 12:22 PM To: Dain Sundstrom Cc: [EMAIL PROTECTED] Subject: Re: [JBoss-dev] 1 to Many Relations When it tries to load the CDTrack relation it generates the following sql statement .. select uuid from CDTrack where composer_composed_songs=? should be .. select uuid from CDTrack where composer=? Dain Sundstrom wrote: I'm using xdoclet to generate the ejb-jar.xml file. When you are generating the accessor methods it automaticly assumes that the accessor name matches the database column name. So in your example by default it is looking for a database columns named composer and performer. This is a packaging issue, ie how much work and how confusing is it to generate the ejb-jar.xml files. From my point of view I think that the simplist case is that each database column has a matching get/set method . So in xdoclet .. Musician { String name; // pk /** @ejb:persist-field @ejb:relation name=songs_composer */ Collection getComposedSongs(); } CDTrack { String uuid; // pk /** @ejb:persist-field @ejb:relation name=songs_composer */ Musician getComposer(); } Generates ejb-relation ejb-relation-namesongs_composer/ejb-relation-name ejb-relationship-role multiplicityMany/multiplicity relationship-role-source ejb-nameCDTrack/ejb-name /relationship-role-source cmr-field cmr-field-namecomposer/cmr-field-name /cmr-field /ejb-relationship-role ejb-relationship-role multiplicityOne/multiplicity relationship-role-source ejb-nameMusician/ejb-name /relationship-role-source cmr-field cmr-field-nameCDTrack/cmr-field-name cmr-field-typejava.util.Collection/cmr-field-type /cmr-field /ejb-relationship-role /ejb-relation Tables .. Musician { String name; } CDTrack { String uuid; String composer; } Got it? So what is the problem? Table mapping is an implementation detail. Does the above not deploy? Is ejb-doclet generating bad ddl? -dain ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
Ok, you are not getting it. I am it's just that the moon is gone ;) Although JBossCMP does not generate the column names you would like, the system still runs. Is that correct? (i.e., this is still a suggestion) If I use the jbosscmp-jdbc.xml file I can get it to work. Ok now that we agree on that. How would you like the column names generated? Be very very specific and take into consideraton the above problems. I do no want jboss to generate any column names. It's not necessary. Either the class field is the database column name or in jbosscmp-jdbc.xml you specify that class field x maps to database column y. If there is a name space collision then it is a database setup problem not JBOSS's and we should not be coding for it. As for my comment easy to code, that is perfectly valid, as we are shooting for CMP 2.0 compliance. CMP 2.0 is a huge spec, so everything can not be perfect in the first pass. Some of the implementation details get implemnted the easy way. There have to be priorities. Yup, it's just this one looks like something that will fill the mailing lists. If you pulled togther your test cases then I could probably have a look, you do not have to do this whole thing by yourself. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
Don't be sorry, be happy ;) the problem is that the name specified in the cmr-field-name is not the database column. Jboss assumes that the database column name is the cmr_field_name (left side) +_ + cmr_field_name right side. What I think makes more sense is for the cmr_field_name by default to match the database column name the same way it does in CMP. Dan OConnor wrote: Hi guys, I've just been skimming this thread, but it strikes me as possible that it is based on a misunderstanding. Dave, do you know that you should not define a cmp field for a foreign key column? So changing the naming convention wouldn't be necessary to get it to work by default. Sorry if this is not the problem, and I have missed the point. If so, please just ignore me. -Dan On 19 Nov 01, at 11:05, Dave Smith wrote: e.net https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
If I use the jbosscmp-jdbc.xml file I can get it to work. Do you have to use the jbosscmp-jdbc.xml file? If you don't, what happens? Does the system generate two columns with the same name? The database table already exsists. Basically I have to use foreign-key-fields and set field-name and column-name attributes the same. Ok now that we agree on that. How would you like the column names generated? Be very very specific and take into consideraton the above problems. I do no want jboss to generate any column names. It's not necessary. Either the class field is the database column name or in jbosscmp-jdbc.xml you specify that class field x maps to database column y. If there is a name space collision then it is a database setup problem not JBOSS's and we should not be coding for it. All column names are either generated, or specified in the jbosscmp-jdbc.xml file. Your opinion is that when jboss generates the column name for a relationship fk it should first attempt to the name of the cmr-field abstract accessors. Problems occur when the entity does not have an accessor for the relationship, and when the primary key related entity maps to more then one db column. What is your complete proposal for fk column generation and relation-table column generation? Be specific. Not quite I suggest you use the name of the cmr-field-name in the ejb-relationship. therefore when creating the column the field always has to be there. Now after great thought how do you keep the columns straight in a multi column pk? So if table1 has a primary key of a,b,c and the foregin key in the table2 is e,f,g and then to find the key a=g,b=f and c=e how do you specify this now? There is no guarantee on the order the fields are pulled out of the primary key. Is the order we specify them in the cmp-fieldfield-name have to be the same on both sides of the relation? Once you answer this I can pull the rest of the proposal together. As for my comment easy to code, that is perfectly valid, as we are shooting for CMP 2.0 compliance. CMP 2.0 is a huge spec, so everything can not be perfect in the first pass. Some of the implementation details get implemnted the easy way. There have to be priorities. Yup, it's just this one looks like something that will fill the mailing lists. If you pulled together your test cases then I could probably have a look, you do not have to do this whole thing by yourself. I know. I am working on the todo list right now (which will be posted to sf), and after that I will be adding my test cases. For now, what is your proposal? -dain ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 1 to Many Relations
Uncle. It seems that JBOSS is designed assuming that it has full control of creating tables. Well in my case I already have a database allready set up so my view of things is how do I stuff this database into JBOSS. I don't think it is worth the discussion which approach is right or wrong but, we should document the view jboss takes and then write appropriate documention for the other approach. Dain if you could get at DTD for jbosscmp-jdbc.xml I'll tidy up xdoclet and write some documentation for I've got these tables now how do I do relations in JBOSS. This should eliminate this thread occurring over and over on the user mailing lists. Dave Dain Sundstrom wrote: If I use the jbosscmp-jdbc.xml file I can get it to work. Do you have to use the jbosscmp-jdbc.xml file? If you don't, what happens? Does the system generate two columns with the same name? The database table already exsists. Basically I have to use foreign-key-fields and set field-name and column-name attributes the same. Ok, now we are getting somewhere. If you want to use an existing database structure you must tell JBossCMP about it. JAWS had the same requirement. If your database happens to work by default, well you were lucky. We make no gaurentees that JBossCMP will map by default the way you want. We may decide that a default name was stupid and change it. Let make this very very very very clear. All column names are either generated, or specified in the jbosscmp-jdbc.xml file. All column names are either generated, or specified in the jbosscmp-jdbc.xml file. Your opinion is that when jboss generates the column name for a relationship fk it should first attempt to the name of the cmr-field abstract accessors. Problems occur when the entity does not have an accessor for the relationship, and when the primary key related entity maps to more then one db column. What is your complete proposal for fk column generation and relation-table column generation? Be specific. Not quite I suggest you use the name of the cmr-field-name in the ejb-relationship. therefore when creating the column the field always has to be there. What about many-to-one unidirectiona relationships that wish to use a fk? Now after great thought how do you keep the columns straight in a multi column pk? So if table1 has a primary key of a,b,c and the foregin key in the table2 is e,f,g and then to find the key a=g,b=f and c=e how do you specify this now? There is no guarantee on the order the fields are pulled out of the primary key. Is the order we specify them in the cmp-fieldfield-name have to be the same on both sides of the relation? Once you answer this I can pull the rest of the proposal together. Order has nothing to do with this. Each pk field is mapped by name in the foreign-key-fields element or the table-fields element. foreign-key-fields foreign-key-field field-namea/field-name column-namee/column-name /foreign-key-field foreign-key-field field-nameb/field-name column-namef/column-name /foreign-key-field foreign-key-field field-namec/field-name column-nameg/column-name /foreign-key-field /foreign-key-fields All of this information is mainatined in the field objects (see the bridge package). -dain ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Current CVS build.
Doh! have to copy run.jar to the bin dir not just the libs. Dain Sundstrom wrote: I updated about 20 minutes ago and it works fine for me. -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 4:58 PM To: [EMAIL PROTECTED] Subject: [JBoss-dev] Current CVS build. When running a JBOSS build from CVS Nov 20, 17:00 EST it now does not start. Here is the starting sequence. (It shuts down by itself). The config files did work with the build from 2 days ago. ./run.sh == == JBoss Bootstrap Environment JAVA: /usr/j2sdk1.3.0/bin/java JAVA_OPTS: -hotspot -Djboss.boot.loader.name=run.sh -Djava.library.path=/home/dave/import/com/candata/bbx -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson. jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.S AXParserFactoryImpl CLASSPATH: /home/dave/j/bin/run.jar: == == [GPA] Microkernel ClassLoaders and Libraries initialized Libraries adding URLClassLoader 2012031725 key URL file:/home/dave/j/conf/default/ Libraries adding URLClassLoader -1231209341 key URL file:/home/dave/j/lib/ext/log4j.jar Libraries adding URLClassLoader -1729047754 key URL file:/home/dave/j/lib/ext/jboss-spine.jar [root] Started Log4jService, config=file:/home/dave/j/conf/default/log4j.properties [GPA] General Purpose Architecture [GPA] [GPA] Java version: 1.3.0,Blackdown Java-Linux Team [GPA] Java VM: Java HotSpot(TM) Client VM Blackdown-1.3.0-FCS,Blackdown Java-Linux Team [GPA] OS-System: Linux 2.2.16,i386 [GPA] JBoss Version : 3.0.0alpha(200109280911) [GPA] JBoss start time : Tue Nov 20 17:47:19 EST 2001 [GPA] localDir : /home/dave/j [GPA] installationURL : file:/home/dave/j/ [GPA] configuration : file:/home/dave/j/conf/default/ [GPA] libraries : file:/home/dave/j/lib/ext/ [GPA] local patch directory: [GPA] Oh, and remember we love you [Shutdown] Shutdown hook added [ServiceController] Controller MBean online [ServiceDeployer] Starting [ServiceDeployer] Found a temp directory left over from a previous run - deleting it. [ServiceDeployer] Temporary deploy directory is /home/dave/j/tmp/deploy/ServiceDeployer [ServiceDeployer] Started [Default] JBoss 3.0.0alpha(200109280911) [RABBIT-HOLE] Started in 0m:1s:193ms [Shutdown] Shutting down all services [Default] Shutting down [ServiceController] Stopping 1 services [ServiceController] Stopped 0 services [Shutdown] Shutdown complete [Default] Shutdown complete ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] jbosscmp-jdbc.xml
I see we have !ELEMENT foreign-key-mapping (ejb-relationship-role, ejb-relationship-role)? Should this not be !ELEMENT foreign-key-mapping (ejb-relationship-role, ejb-relationship-role?) I think for a uni-directional relationship there would be only 1 role. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Rabbit Hole with PostgreSQL
Here is my postgresql-default-service.xml that is in the deploy directory Hunter Hillegas wrote: I am starting to test my app on RH/3.0alpha so I need to get it running against Postgres 7.1. It looks like the config for datasources has changed/moved quite a bit. What files do I need to generate and where do I need to put them to get Rabbit Hole running against PostgreSQL? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ?xml version=1.0 encoding=UTF-8? server classpath archives=postgresql.jar/ mbean code=org.jboss.resource.ConnectionFactoryLoader name=JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=DefaultDS attribute name=ManagedConnectionFactoryProperties ConnectionURL=jdbc:postgresql://localhost/Import DriverClass=org.postgresql.Driver UserName=dave Password= /attribute attribute name=JndiNameDefaultDS/attribute attribute name=TransactionManagerNamejava:/TransactionManager/attribute mbean-ref name=ResourceAdapterNameJCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter/mbean-ref mbean-ref name=ConnectionManagerFactoryLoaderNameJCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory/mbean-ref attribute name=ConnectionManagerProperties InvalidateOnError=false Blocking=true IdleTimeoutMillis=180 MaxSize=10 TimestampUsed=false IdleTimeoutEnabled=false GCIntervalMillis=12 MinSize=0 GCMinIdleMillis=120 GCEnabled=false MaxIdleTimeoutPercent=1.0 /attribute attribute name=PrincipalMappingClass org.jboss.resource.security.ManyToOnePrincipalMapping /attribute attribute name=PrincipalMappingProperties UserName=dave /attribute /mbean /server
Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS?
In your postgresql-default-service.xml what do you have as the JnDIname and the name of the Mbean? Hunter Hillegas wrote: I am deploying a 2.0EJB jar into RH3. Here's my jbosscmp-jdbc.xml file: ?xml version=1.0 encoding=UTF-8? !DOCTYPE jbosscmp-jdbc jbosscmp-jdbc defaults datasourcejava:/Groundswell/datasource type-mappingPostgreSQL/type-mapping debugtrue/debug create-tabletrue/create-table remove-tablefalse/remove-table read-onlyfalse/read-only time-out300/time-out select-for-updatefalse/select-for-update preferred-relation-mappingforeign-key/preferred-relation-mapping /defaults /jbosscmp-jdbc No matter what, the jar tries to run against DefaultDS when I want it to run against 'Groundswell' as the datasource. What am I doing wrong? Hunter ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS?
Well if you want to get down and dirty in jboss/server/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCEntityMetaData.java line 336 is where it sets the datasouce for each entity. On line 343 you could add System.out.println(Enity = +entityName+ +dataSourceNameString+ +defaultValues.getDataSourceName()); That should give you the datasource the entity is bound to. Hunter Hillegas wrote: Are we sure that the datasource name in jbosscmp-jdbc.xml is even being checked properly? I gave my config another look and it seems correct. Here are is the console log output: [11:43:51,571,AutoDeployer] Auto deploy of file:/Users/hunter/Desktop/jboss-3.0.0alpha/deploy/postgresqldb-default-serv ice.xml [11:43:51,602,Default] Libraries adding URLClassLoader 1240345370 key URL file:/Users/hunter/Desktop/jboss-3.0.0alpha/lib/ext/postgresql.jar [11:43:51,647,ServiceCreator] About to create the beanJBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell [11:43:51,653,ServiceCreator] Created the beanJBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell And the file: ?xml version=1.0 encoding=UTF-8? !-- = -- !-- -- !-- JBoss Server Configuration -- server classpath archives= postgresql.jar/ !-- -- !-- JDBC - Initialize the databases -- !-- to ConnectionFactoryLoader -- !-- -- mbean code=org.jboss.resource.ConnectionFactoryLoader name=JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell attribute name=ManagedConnectionFactoryPropertiesConnectionURL=jdbc:postgresql://lo calhost/groundswell DriverClass=org.postgresql.Driver UserName=postgres Password=/attribute attribute name=JndiNameGroundswell/attribute attribute name=TransactionManagerNamejava:/TransactionManager/attribute !--Anonymous mbean-ref to database being started -- mbean-refJBOSS-SYSTEM:service=PostgreSQL/mbean-ref mbean-ref name=ResourceAdapterNameJCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter/mbean-ref mbean-ref name=ConnectionManagerFactoryLoaderNameJCA:service=ConnectionManagerFacto ryLoader,name=MinervaSharedLocalCMFactory/mbean-ref attribute name=ConnectionManagerProperties# #Wed Aug 15 16:17:29 EDT 2001 MinSize=0 MaxSize=10 BlockingTimeoutMillis=5000 IdleTimeoutMinutes=30 CleanupIntervalMinutes=10 MaxIdleTimeoutPercent=1.0 /attribute attribute name=PrincipalMappingClass org.jboss.resource.security.ManyToOnePrincipalMapping /attribute attribute name=PrincipalMappingPropertiesUserName=postgres/attribute /mbean /server From: David Jencks [EMAIL PROTECTED] Date: Tue, 20 Nov 2001 13:48:05 -0500 To: Torsten Schlumm [EMAIL PROTECTED] Cc: Hunter Hillegas [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS? Have you guys included the latest updates to the ConnectionFactoryLoader configuration format? The hsqldb example has been updated, the manual likewise for mysql and postgres. If updating is not the problem, could you post your cfl config? does DefaultDS get started properly on your system? Thanks david jencks On 2001.11.20 12:57:30 -0500 Torsten Schlumm wrote: Hunter, I've seen the same thing with mySQL today (it did work with the CVS sources from about 3 weeks ago). After having a closer look at the list of registered MBeans (localhost:8082) I found it (at least something :) My mysqlDS was perfectly registered but not started. After starting it by hand no problems anymore - deployment works. If that still doesn't work for you I could also send you the relevant files from my setup/beans. I will also try to work out why the bloody thing doesn't get started. Anyone any ideas?? Cheers Torsten On Mon, 19 Nov 2001 16:06:25 -0800 Hunter Hillegas [EMAIL PROTECTED] wrote: So far nothing from this end. If you get a chance to look at or if anyone else has any ideas, please chime in? Is no one else running Rabbit Hole with PostgreSQL and 2.0 EJB? From: Dain Sundstrom [EMAIL PROTECTED] Date: Mon, 19 Nov 2001 16:14:21 -0600 To: 'Hunter Hillegas' [EMAIL PROTECTED], Dain Sundstrom [EMAIL PROTECTED], JBoss Dev [EMAIL PROTECTED] Subject: RE: [JBoss-dev] 2.0 jar Really Likes DefaultDS? The ds jndi name is loaded in the metadata object of entities in the ...plulgin.cmp.jdbc.metadata package. Then the ds is looked up in the JDBCStoreManager init method. Finally it is used in the JDBCCommand object. -dain -Original Message- From: Hunter Hillegas [mailto:[EMAIL PROTECTED]] Sent: Monday, November 19, 2001 3:50 PM To: Dain Sundstrom; JBoss Dev Subject: Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS? I haven't
Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS?
Weird. So this has to point to either the standardjbosscmp-jdbc.xml or jbosscmp-jdbc.xml. What's really strange is the default is null. This should come from standardjbosscmp-jdbc.xml. What else is strange is that it thinks in jboss-cmp-jdbc.xml for each entity you have a datasource element. Maybee grabbing the wrong standard config? Hunter Hillegas wrote: I'm not so sure. Despite having my jbosscmp-jdbc.xml file included, I get this on the console as it deploys my beans after I made Dave's change: [13:02:37,433,Default] Entity = ProductAttribute java:/DefaultDS null [13:02:37,437,Default] Entity = Product java:/DefaultDS null [13:02:37,439,Default] Entity = Order java:/DefaultDS null [13:02:37,443,Default] Entity = OrderLineItem java:/DefaultDS null [13:02:37,445,Default] Entity = ProductLineItem java:/DefaultDS null [13:02:37,448,Default] Entity = ProductGroup java:/DefaultDS null It's apparently trying to use DefaultDS even though I explicitly tell it not to in the jbosscmp-jdbc.xml file... If your config is working correctly, I'm stumped! From: Dain Sundstrom [EMAIL PROTECTED] Date: Tue, 20 Nov 2001 14:56:24 -0600 To: 'Dave Smith' [EMAIL PROTECTED], Hunter Hillegas [EMAIL PROTECTED] Cc: David Jencks [EMAIL PROTECTED], Torsten Schlumm [EMAIL PROTECTED], JBoss Dev [EMAIL PROTECTED] Subject: RE: [JBoss-dev] 2.0 jar Really Likes DefaultDS? Funny. I just did that but in org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager line 110 where the datasource is looked up. And it successfully looks up my new datasource. I think you have a different problem. I changed the name of the hypersonic data source. May be the problem is your postgresql driver setup. -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 2:41 PM To: Hunter Hillegas Cc: David Jencks; Torsten Schlumm; JBoss Dev Subject: Re: [JBoss-dev] 2.0 jar Really Likes DefaultDS? Well if you want to get down and dirty in jboss/server/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/ JDBCEntityMetaData.java line 336 is where it sets the datasouce for each entity. On line 343 you could add System.out.println(Enity = +entityName+ +dataSourceNameString+ +defaultValues.getDataSourceName()); That should give you the datasource the entity is bound to. Hunter Hillegas wrote: Are we sure that the datasource name in jbosscmp-jdbc.xml is even being checked properly? I gave my config another look and it seems correct. Here are is the console log output: [11:43:51,571,AutoDeployer] Auto deploy of file:/Users/hunter/Desktop/jboss-3.0.0alpha/deploy/postgresqld b-default-serv ice.xml [11:43:51,602,Default] Libraries adding URLClassLoader 1240345370 key URL file:/Users/hunter/Desktop/jboss-3.0.0alpha/lib/ext/postgresql.jar [11:43:51,647,ServiceCreator] About to create the beanJBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell [11:43:51,653,ServiceCreator] Created the beanJBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell And the file: ?xml version=1.0 encoding=UTF-8? !-- = -- !-- -- !-- JBoss Server Configuration -- server classpath archives= postgresql.jar/ !-- -- !-- JDBC - Initialize the databases -- !-- to ConnectionFactoryLoader -- !-- -- mbean code=org.jboss.resource.ConnectionFactoryLoader name=JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=Groundswell attribute name=ManagedConnectionFactoryPropertiesConnectionURL=jdbc:p ostgresql://lo calhost/groundswell DriverClass=org.postgresql.Driver UserName=postgres Password=/attribute attribute name=JndiNameGroundswell/attribute attribute name=TransactionManagerNamejava:/TransactionManager/attribute !--Anonymous mbean-ref to database being started -- mbean-refJBOSS-SYSTEM:service=PostgreSQL/mbean-ref mbean-ref name=ResourceAdapterNameJCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter/mbean-ref mbean-ref name=ConnectionManagerFactoryLoaderNameJCA:service=Connecti onManagerFacto ryLoader,name=MinervaSharedLocalCMFactory/mbean-ref attribute name=ConnectionManagerProperties# #Wed Aug 15 16:17:29 EDT 2001 MinSize=0 MaxSize=10 BlockingTimeoutMillis=5000 IdleTimeoutMinutes=30 CleanupIntervalMinutes=10 MaxIdleTimeoutPercent=1.0 /attribute attribute name=PrincipalMappingClass org.jboss.resource.security.ManyToOnePrincipalMapping /attribute attribute name=PrincipalMappingPropertiesUserName=postgres/attribute /mbean /server From: David Jencks [EMAIL PROTECTED] Date: Tue, 20 Nov 2001 13:48:05 -0500 To: Torsten Schlumm [EMAIL PROTECTED] Cc: Hunter Hillegas [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [JBoss
Re: [JBoss-dev] Is defaultscreate-table working?
Ever since I have used RH it has never worked. Dain Sundstrom wrote: It should work, but I don't know. I'll check it out. -dain -Original Message- From: Ignacio Coloma [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 4:15 PM To: Jboss Development Subject: [JBoss-dev] Is defaultscreate-table working? I want to switch create-table off by default, but the tag is being ignored. I checked the dtd to be sure that everything's ok. Maybe it's time to download the latest sources? Only tell me that it works for someone out there and I'll keep trying... jbosscmp-jdbc:= jbosscmp-jdbc defaults datasourcejava:/CanplasticaMySQLDS/datasource type-mappingmySQL/type-mapping debugtrue/debug create-tablefalse/create-table remove-tablefalse/remove-table /defaults ... entity ejb-nameOferta/ejb-name table-nameOFERTA/table-name cmp-field field-nameid/field-name column-nameID/column-name /cmp-field cmp-field field-namenombre/field-name column-nameNOMBRE/column-name /cmp-field cmp-field field-namefechaInicio/field-name column-nameFECHA_INICIO/column-name /cmp-field cmp-field field-namefechaFin/field-name column-nameFECHA_FIN/column-name /cmp-field /entity conf/default/standardjbosscmp-jdbc.xml:= defaults datasourcejava:/DefaultDS/datasource type-mappingHypersonic SQL/type-mapping debugtrue/debug create-tablefalse/create-table remove-tablefalse/remove-table read-onlyfalse/read-only time-out300/time-out select-for-updatefalse/select-for-update preferred-relation-mappingforeign-key/preferred-relation-mapping /defaults server log:= [2001-11-29 22:06:15,468,CMP,DEBUG] Start command executing: CREATE TABLE OFERTA (ID INTEGER, FECHA_FIN DATETIME, NOMBRE VARCHAR(255) BINARY, FECHA_INICIO DATETIME) [2001-11-29 22:06:15,468,CanplasticaMySQLDS,DEBUG] Pool CanplasticaMySQLDS [0/0/10] destroyed object org.jboss.resource.adapter.jdbc.local.JDBCManagedConnection@8deb8a. [2001-11-29 22:06:15,478,CMP,DEBUG] java.sql.SQLException: General error: Table 'oferta' already exists [2001-11-29 22:06:15,478,CMP,DEBUG] Could not create table OFERTA ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Off Topic: Disable underline text in vim?
/usr/local/share/vimvim version/syntax/java.vim tells what patterns get which functions. In the same directory synload.vim maps those functions to colour. On Thu, 2002-12-05 at 15:39, Dain Sundstrom wrote: The is completely off topic... Does anyone know how to completely disable underlined text in vim? I recently switched to OS X and the vim now underlines key words (and other crap)... it is driving me nuts. Thanks for any help, -dain --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] [JBoss-user] JBoss-3.0.5 release available
I am I blind? I see 3.2 beta and 3.0.4 but no 3.0.5? On Mon, 2003-01-13 at 06:40, Scott M Stark wrote: The 3.0.5 release of JBoss is available from SourceForge here: https://sourceforge.net/project/showfiles.php?group_id=22866 Detailed change notes are available here: https://sourceforge.net/project/shownotes.php?release_id=129789 The 3.2.0RC1 release will be done tomorrow. Scott Stark Chief Technology Officer JBoss Group, LLC --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Securing JNDI http invoker.
I am using JBOSS 3.0.6 and am trying to secure the JNDI invoker via https. Looking at the code there seems to such way to do this. How do you get the current username and password from the current login context? It would be fairly trival to check the return value, if it is 401 then retry with the current login. So .. if(connn.getResponseCode() == java.net.HttpURLConnection.HTTP_UNAUTHORIZED) { get login,pass from login context userPassword=userName+:+passwd String encoding = new sun.misc.BASE64Encoder().encode(userPassword.getBytes()); URLConnection uc = url.openConnection(); uc.setRequestProperty (Authorization, Basic + encoding); getInputStream blah,blah,blah } --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Securing JNDI http invoker.
Ok. We got it to work but we had to call new org.jboss.invocation.http.interfaces.Util(); after we logged in and before new did new InitialContext(). I think the test case works becuase it tests the failure first, which would call the static part of Util to initalize the context, so when the actual valid call is done the static method has been called. Now do I have to hard code the http invokers into the jboss.xml deployment file for each bean? Why does the naming lookup not update the invocation context with the http invoker on the home methods and then the home methods update the EJB clases with the home's invoker type? I need both http invocation and rmi based on how the bean was looked up in JNDI. On Mon, 2003-02-03 at 23:29, Scott M Stark wrote: Its handled by a custom java.net.Authenticator that integrates with the current security context. There are testcases showing how to access a secured JNDI invoker over http. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 8:33 AM Subject: [JBoss-dev] Securing JNDI http invoker. I am using JBOSS 3.0.6 and am trying to secure the JNDI invoker via https. Looking at the code there seems to such way to do this. How do you get the current username and password from the current login context? It would be fairly trival to check the return value, if it is 401 then retry with the current login. So .. if(connn.getResponseCode() == java.net.HttpURLConnection.HTTP_UNAUTHORIZED) { get login,pass from login context userPassword=userName+:+passwd String encoding = new sun.misc.BASE64Encoder().encode(userPassword.getBytes()); URLConnection uc = url.openConnection(); uc.setRequestProperty (Authorization, Basic + encoding); getInputStream blah,blah,blah } --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] AOP versioned ACID objects 1st iteration
Too bad that the whole world is more intretsed whether or not JBOSS will become J2EE certified. I was reading an article about Unintended Consequences that made me think of the current J2EE cerification vs. JBOSS 4.0 with AOP. In 1349 the black plague was spreading around Europe. In castles and universities and town halls across Europe, great minds pondered the cause of the plague. And they came pretty close. The collective academic wisdom was that the source of the Black Plague was fleas. So the word went out from town to town across Europe - to stop the plague - kill the fleas - by killing all the dogs. And immediately the slaughter of all dogs began. But like lots of well-intentioned academic ideas it was somewhat wide of the mark...and had unexpected consequences. The cause was fleas all right, but not dog fleas...it was rat fleas. And in the 1300's what was the most effective way to hold down the rat population? You guessed it - dogs. So by suggesting that townsfolk kill their dogs, the wise authorities had unwittingly allowed the rat population to flourish and thus a new vicious rash of Black Plague began. Before it was over, three years later, nearly 1 out of 3 people in the world had died of the plague. (John Mauldin) So in the quest to impove J2EE have you killed it? marc fleury wrote: do you motherfuckers realize how BIG this is? no? there is close to NOTHING in 20,000 pages of J2EE about this. marcf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Burke Sent: Wednesday, March 26, 2003 7:09 PM To: Jboss-Dev Subject: [JBoss-dev] AOP versioned ACID objects 1st iteration I have implemented a new AOP service for Serializable POJOs, Versioned Objects. You can transactionally version an object. If you modify the object within a transaction, this modification is not seen by other transactions. If the tx commits, the changes seen, if a rollback happens the changes are rolled back. On commit, if another tx has modified the object, the tx will rollback (OptimisticLocking). The way it works is as follows: POJO pojo = new POJO(); pojo = (POJO)org.jboss.aop.plugins.Versioned.makeVersioned(pojo); calling Versioned.makeVersioned creates a proxy that sits in front of the real object. transactionManager.begin(); pojo.callMethod(); when callMethod is invoked since there is a transaction, an interceptor creates a copy of the REAL pojo and does all further invocations on this copy. pojo.someField = 5; If you have field interception turned on, public field will also be accessed via the copy/version tm.commit(); On commit, a tx Synchronization checks to see if the version you have created is the latest and greatest. If not an org.jboss.aop.plugins.OptimisticLockFailure exception is thrown in beforeCompletion. I'm not sure how this exception is wrapped. Some other semantics: 1. All method invocations force a version to be created. You can avoid this by declared class-metadata as follows: class-metadata name=234234 group=VERSIONED class=org.jboss.test.aop.bean.VersionedPOJO method name=get.* read-onlytrue/read-only /method /class-metadata A readonly method will not cause the creation of a version and the current object will be used. An example and unit test is under testsuite/src/main/org/jboss/test/aop/bean/VersionedObjectTester.java The example object VersionedPOJO.java, has 1 interceptor pointcut declared on the class to do Tx stuff. See testsuite/src/resources/aop/META-INF/jboss-aop.xml for more details. What would be nice is to also write a TransactionalLock interceptor for versioned POJO's that have high OptimisticLock failures. Bill --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] AOP versioned ACID objects 1st iteration
:rotfl .. a Frenchman wanting action This is hot shit. Plain and simple. Take the J2EE spec and piss all over it. When you wrote it your mind was small and feeble, we have seen the light. The question is how long before the world realizes it or does J2EE implode and we all are paying homage to Bill and .NET May God Bless America and Java. marc fleury wrote: So in the quest to impove J2EE have you killed it? bla bla bla bla marc fleury wrote: do you motherfuckers realize how BIG this is? obviously some of you don't get it, give it time, it will become very obvious enough wasted time in the U.N. Time for some good ol' action marcf --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
I just took Simone's patch and applied it to the 3_0 branch. it did not work. Here is the stacktrace. ... Cause: java.lang.ClassCircularityError: java/lang/String 07:57:09,416 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:307) 07:57:09,417 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 07:57:09,417 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.invokeMethod(Unknown Source) 07:57:09,417 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.postMsg(Unknown Source) 07:57:09,417 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.recvMsg(Unknown Source) 07:57:09,418 ERROR [STDERR] at com.candata.gateway.CCRAPoll.run(Unknown Source) 07:57:09,418 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484) On Fri, 2002-05-31 at 12:13, Bordet, Simone wrote: Hi, so I dug into the hotspot code for JDK 131, and I found the problem. I am too tired now to think for a solution, this is for you brave guys :) The problems arises from a 20 lines of code in src/share/vm/memory/systemDictionary.cpp (attached), method resolve_instance_class_or_null(...). The loading mechanism of the JVM is done in 2 steps: 1- look in a dictionary, if not found, put there a placeholder, then 2- load the class, calling loadClassInternal(). Thread A comes in asking for class cls1 with classloader cl1, the class has never been loaded, put a placeholder in the dictionary, and call loadClassInternal. Thread B comes in asking for class cls1 with classloader cl1, there is already a placeholder, throw CCE. The key is to ask for the same class with the same classloader. I think this may happen with the UnifiedClassLoader scheme in several occasions, a simple example being: class Base {} class Derived1 extends Base {} class Derived2 extends Base {} If Base is loaded by classloader1, and we have 2 threads trying to load one Derived1 and one Derived2 (and both need Base), we end up with 2 thread using the same classloader to load the same class, and the JVM code throws CCE. I wrote a simple testcase (attached), but it does not use JBoss classloaders, however should be trivial to code it against JBoss codebase. If someone can take care of it... thanks :P As I said I did not think enough to find a solution, but at least we all know where to start. Cheers Simon PS: it seems attachments are not allowed ? ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
On Wed, 2002-06-05 at 08:36, Bordet, Simone wrote: Hi Dave, I just took Simone's patch and applied it to the 3_0 branch. Do you mean what I committed to HEAD 2-3 hrs ago ? yes version 1.12 it did not work. Here is the stacktrace. ... Cause: java.lang.ClassCircularityError: java/lang/String I catch CCE in the new code, how come you get it back ? I thought you would know that ;-). Anything I can do to help the debugging? Cheers Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
Well after alot of tracking down it looks like it is comming from the JVM itself. Looking at the code snippet it checks to see if the class is in the table *before* calling the classloader. I can not generate a stack trace for the life of me anywhere ... Any other pointers .. On Wed, 2002-06-05 at 09:05, Bordet, Simone wrote: Hi Dave, Cause: java.lang.ClassCircularityError: java/lang/String I catch CCE in the new code, how come you get it back ? I thought you would know that ;-). Anything I can do to help the debugging? Yes, can you track down from where exactly the CCE comes from ? It seems from your stack trace that you're using JMX to invoke a method in the CCRAPoll thread. CCE is triggered by classloading so the change I made should catch all CCEs, not let them out. Finding this will really help, I suspect there is more than one entry point in the ULR. Cheers Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
Actully does not this part of the JVM spec basically say it all ... 5.3.2 Loading Using a User-defined Class Loader The following steps are used to load and thereby create the nonarray class or interface C denoted by N using a user-defined class loader L. First, the Java virtual machine determines whether L has already been recorded as an initiating loader of a class or interface denoted by N. If so, this class or interface is C, and no class creation is necessary. Otherwise the Java virtual machine invokes loadClass(N ) on L.1 The value returned by the invocation is the created class or interface C. The Java virtual machine then records that L is an initiating loader of C (Ā§5.3.4). The remainder of this section describes this process in more detail. When the loadClass method of the class loader L is invoked with the name N of a class or interface C to be loaded, L must perform one of the following two operations in order to load C : 1. The class loader L can create an array of bytes representing C as the bytes of a ClassFile structure (Ā§4.1); it then must invoke the method defineClass of class ClassLoader. Invoking defineClass causes the Java virtual machine to derive a class or interface denoted by N using L from the array of bytes using the algorithm found in Section 5.3.5. 2. The class loader L can delegate the loading of C to some other class loader L'. This is accomplished by passing the argument N directly or indirectly to an invocation of a method on L' (typically the loadClass method). Th On Wed, 2002-06-05 at 11:17, Dave Smith wrote: Well after alot of tracking down it looks like it is comming from the JVM itself. Looking at the code snippet it checks to see if the class is in the table *before* calling the classloader. I can not generate a stack trace for the life of me anywhere ... Any other pointers .. On Wed, 2002-06-05 at 09:05, Bordet, Simone wrote: Hi Dave, Cause: java.lang.ClassCircularityError: java/lang/String I catch CCE in the new code, how come you get it back ? I thought you would know that ;-). Anything I can do to help the debugging? Yes, can you track down from where exactly the CCE comes from ? It seems from your stack trace that you're using JMX to invoke a method in the CCRAPoll thread. CCE is triggered by classloading so the change I made should catch all CCEs, not let them out. Finding this will really help, I suspect there is more than one entry point in the ULR. Cheers Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
OK. wrapped up the target method in CCE. These are thrid party libs and I believe smoewhere in the bowels they use forName() and newInstance(). What I don't understand is why I do not see it going through the UCL. or at least a classloader. Here is the bt 11:48:58,960 ERROR [STDERR] java.lang.ClassCircularityError: com/entrust/toolkit/util/ByteArray 11:48:58,990 ERROR [STDERR] at com.entrust.toolkit.credentials.b.a(StreamUtil.java) 11:48:59,000 ERROR [STDERR] at com.entrust.toolkit.credentials.l.b(InternalStreamProfileReader.java) 11:48:59,010 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.a(Profile.java) 11:48:59,020 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.init(Profile.java) 11:48:59,029 ERROR [STDERR] at com.entrust.toolkit.User.login(User.java) 11:48:59,050 ERROR [STDERR] at com.candata.gateway.EncryptionService.init(Unknown Source) 11:48:59,059 ERROR [STDERR] at com.candata.gateway.EncryptionService.createMsg(Unknown Source) 11:48:59,070 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method) 11:48:59,079 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 11:48:59,090 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 11:48:59,100 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.invokeMethod(Unknown Source) 11:48:59,129 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.postMsg(Unknown Source) 11:48:59,139 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.recvMsg(Unknown Source) 11:48:59,169 ERROR [STDERR] at com.candata.gateway.CCRAPoll.run(Unknown Source) 11:48:59,179 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484) On Wed, 2002-06-05 at 11:38, Bordet, Simone wrote: Hi Dave, Well after alot of tracking down it looks like it is comming from the JVM itself. Yes, CCE are only thrown from the JVM code. Sorry, I was not clear before. I see you are using JMX to invoke some method, yes ? Let's call it target method, you call it from CCRAAbstract.invokeMethod(...), right ? Check inside the target method if you do: -loadClass() -newInstance() or, recursively, if you call some method that does this (just wrap the whole target method into a try/catch(CCE x)). Do you ever arrive to the target method ? If so, that's good, otherwise, a more difficult. Waiting for news, Thanks Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
I have decompilied it before to make some sense of it. I now there is a class.forName and a newInstance but I don't think they use there own classloader. All of the classes are in the deploy directory not in the jboss lib dir. The -sevice.xml file that starts this is has them in a classpath def pointing to the current directory. Where it is dieing it is simply reading a file that has the x509 certificate info. On Wed, 2002-06-05 at 12:06, Bordet, Simone wrote: Hi Dave, OK. wrapped up the target method in CCE. These are thrid party libs and I believe smoewhere in the bowels they use forName() and newInstance(). What I don't understand is why I do not see it going through the UCL. or at least a classloader. I guess because they're using their own classloader, probably in StreamUtil.java. I see they're obfuscated, so I guess you don't have access to the source code, do you ? Are these 3rd party libs in the classpath, or they're loaded by JBoss ? Simon Here is the bt 11:48:58,960 ERROR [STDERR] java.lang.ClassCircularityError: com/entrust/toolkit/util/ByteArray 11:48:58,990 ERROR [STDERR] at com.entrust.toolkit.credentials.b.a(StreamUtil.java) 11:48:59,000 ERROR [STDERR] at com.entrust.toolkit.credentials.l.b(InternalStreamProfileReader.java) 11:48:59,010 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.a(Profile.java) 11:48:59,020 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.init(Profile.java) 11:48:59,029 ERROR [STDERR] at com.entrust.toolkit.User.login(User.java) 11:48:59,050 ERROR [STDERR] at com.candata.gateway.EncryptionService.init(Unknown Source) 11:48:59,059 ERROR [STDERR] at com.candata.gateway.EncryptionService.createMsg(Unknown Source) 11:48:59,070 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method) 11:48:59,079 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(Reflec tedMBeanDispatcher.java:284) ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
From my CCE catch block catch(ClassCircularityError err) { err.printStackTrace(); System.out.println(com.candata.gateway.EncryptionService +com.candata.gateway.EncryptionService.class.getClassLoader().getClass().getName()); System.out.println(com/entrust/toolkit/x509/policies/ClientSettings +com.entrust.toolkit.x509.policies.ClientSettings.class.getClassLoader().getClass().getName()); System.out.println(com/entrust/toolkit/util/ByteArray +com.entrust.toolkit.util.ByteArray.class.getClassLoader().getClass().getName()); } The Bt 13:49:06,299 ERROR [STDERR] java.lang.ClassCircularityError: com/entrust/toolkit/util/ByteArray 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.b.a(StreamUtil.java) 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.l.b(InternalStreamProfileReader.java) 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.a(Profile.java) 13:49:06,301 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.init(Profile.java) 13:49:06,301 ERROR [STDERR] at com.entrust.toolkit.User.login(User.java) 13:49:06,301 ERROR [STDERR] at com.candata.gateway.EncryptionService.init(Unknown Source) 13:49:06,301 ERROR [STDERR] at com.candata.gateway.EncryptionService.createMsg(Unknown Source) 13:49:06,302 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method) 13:49:06,302 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 13:49:06,302 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.invokeMethod(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.postMsg(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.recvMsg(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAPoll.run(Unknown Source) 13:49:06,304 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484) On Wed, 2002-06-05 at 13:11, Bordet, Simone wrote: Hi Dave, I have decompilied it before to make some sense of it. I now there is a class.forName and a newInstance but I don't think they use there own classloader. Uhm. All of the classes are in the deploy directory not in the jboss lib dir. The -sevice.xml file that starts this is has them in a classpath def pointing to the current directory. Where it is dieing it is simply reading a file that has the x509 certificate info. Ok, can you do one more test ? Can you please print the classloader for your classes, via for example: com.candata.gateway.EncryptionService.class.getClassLoader() and for the lib classes, via for example: com.entrust.toolkit.User.class.getClassLoader() com.entrust.toolkit.credentials.Profile.class.getClassLoader() I think Class.forName may be the source of the problem, as bypasses a direct call to the classloader, going directly to the JVM class cache. Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ClassCircularityError - PROBLEM FOUND !
Doh .. 13:49:07,802 INFO [STDOUT] com.candata.gateway.EncryptionService org.jboss.mx.loading.UnifiedClassLoader 13:49:13,210 INFO [STDOUT] com/entrust/toolkit/x509/policies/ClientSettings org.jboss.mx.loading.UnifiedClassLoader 13:49:13,224 INFO [STDOUT] com/entrust/toolkit/util/ByteArray org.jboss.mx.loading.UnifiedClassLoader On Wed, 2002-06-05 at 13:53, Dave Smith wrote: From my CCE catch block catch(ClassCircularityError err) { err.printStackTrace(); System.out.println(com.candata.gateway.EncryptionService +com.candata.gateway.EncryptionService.class.getClassLoader().getClass().getName()); System.out.println(com/entrust/toolkit/x509/policies/ClientSettings +com.entrust.toolkit.x509.policies.ClientSettings.class.getClassLoader().getClass().getName()); System.out.println(com/entrust/toolkit/util/ByteArray +com.entrust.toolkit.util.ByteArray.class.getClassLoader().getClass().getName()); } The Bt 13:49:06,299 ERROR [STDERR] java.lang.ClassCircularityError: com/entrust/toolkit/util/ByteArray 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.b.a(StreamUtil.java) 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.l.b(InternalStreamProfileReader.java) 13:49:06,300 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.a(Profile.java) 13:49:06,301 ERROR [STDERR] at com.entrust.toolkit.credentials.Profile.init(Profile.java) 13:49:06,301 ERROR [STDERR] at com.entrust.toolkit.User.login(User.java) 13:49:06,301 ERROR [STDERR] at com.candata.gateway.EncryptionService.init(Unknown Source) 13:49:06,301 ERROR [STDERR] at com.candata.gateway.EncryptionService.createMsg(Unknown Source) 13:49:06,302 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method) 13:49:06,302 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 13:49:06,302 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.invokeMethod(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.postMsg(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAAbstract.recvMsg(Unknown Source) 13:49:06,303 ERROR [STDERR] at com.candata.gateway.CCRAPoll.run(Unknown Source) 13:49:06,304 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484) On Wed, 2002-06-05 at 13:11, Bordet, Simone wrote: Hi Dave, I have decompilied it before to make some sense of it. I now there is a class.forName and a newInstance but I don't think they use there own classloader. Uhm. All of the classes are in the deploy directory not in the jboss lib dir. The -sevice.xml file that starts this is has them in a classpath def pointing to the current directory. Where it is dieing it is simply reading a file that has the x509 certificate info. Ok, can you do one more test ? Can you please print the classloader for your classes, via for example: com.candata.gateway.EncryptionService.class.getClassLoader() and for the lib classes, via for example: com.entrust.toolkit.User.class.getClassLoader() com.entrust.toolkit.credentials.Profile.class.getClassLoader() I think Class.forName may be the source of the problem, as bypasses a direct call to the classloader, going directly to the JVM class cache. Simon ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] JBoss through firwall - RMI -HTTP tunneling
Now I have my swing client running with a jboss backend I would like to move this beast out on to the internet. Some of my clients have firewalls that only allow them http and https access through a proxy, so a direct connection is out. It would seem I could optimize this by writting a custom EJB proxy for the connection and use HTTP tunneling for the naming lookup. I think soap for my app is overkill and would be quite slow. Experences, optionions , suggestions? ___ Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JBoss through firwall - RMI -HTTP tunneling
After a quick read of the spec .. Does the ejb-local only get acessed when an externel client is accessing the EJB or for all access? So if a SB accesses an EB becuase it is local the container can optimize the call and not send it over RMI? On Wed, 2002-06-12 at 08:03, Holger Engels wrote: On 12 Jun 2002, Dave Smith wrote: Now I have my swing client running with a jboss backend I would like to move this beast out on to the internet. Some of my clients have firewalls that only allow them http and https access through a proxy, so a direct connection is out. It would seem I could optimize this by writting a custom EJB proxy for the connection and use HTTP tunneling for the naming lookup. I think soap for my app is overkill and would be quite slow. Experences, optionions , suggestions? smartcc.sourcefore.net .. a generic j2ee conform client container, that addresses exactly this problem. Features: o client side interceptors o pluggable transport (RMI/HTTP) o Replay Tool for recording use cases and performing load tests o no proprietary API Holger ___ Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] JBOSS CMP - relations not using DefaultDS
If I have two tables a nd b that are related with a forgien key but the tables are not in the default datasource it tries to bind the relation to the default datasource. In JDBCCMRFieldBridge.java it should set the default Datasource for the relation from the JDBCEntityBridge.java. If it is table mapping and the datasource is supplied then it should be ignored. Dain? ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JBOSS CMP - relations not using DefaultDS
Sorry.. I was trying give the solution the same time as the problem. My problem is if you are using foreign-key-mapping with two tables that are not in the default datasource the relation tries to execute the sql command on the default datasource. For table mapping you can specify the datasource for the relation table. For foreign-key-mapping we should use the datasource of the table not the default. So.. table a and b in datasource LocalDb. The default datasource is RemoteDb. a has a 1 to many unidirection relationship with b. When you are trying to access the collection it is looking for b in thew RemoteDb instead of the LocalDb. New Dad , lack of sleep ... I hope this is clear ... On Fri, 2002-06-14 at 13:40, Dain Sundstrom wrote: Dave Smith wrote: If I have two tables a nd b that are related with a forgien key but the tables are not in the default datasource it tries to bind the relation to the default datasource. In JDBCCMRFieldBridge.java it should set the default Datasource for the relation from the JDBCEntityBridge.java. If it is table mapping and the datasource is supplied then it should be ignored. Dave, you lost me. If your are using a foreign-key-mapping the datasorce present in JDBCCMRFieldBridge should not be used. Is it being used? If it is, where? -dain ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JBOSS CMP - relations not using DefaultDS
Sorry.. I was trying give the solution the same time as the problem. My problem is if you are using foreign-key-mapping with two tables that are not in the default datasource the relation tries to execute the sql command on the default datasource. For table mapping you can specify the datasource for the relation table. For foreign-key-mapping we should use the datasource of the table not the default. So.. table a and b in datasource LocalDb. The default datasource is RemoteDb. a has a 1 to many unidirection relationship with b. When you are trying to access the collection it is looking for b in thew RemoteDb instead of the LocalDb. New Dad , lack of sleep ... I hope this is clear ... On Fri, 2002-06-14 at 13:40, Dain Sundstrom wrote: Dave Smith wrote: If I have two tables a nd b that are related with a forgien key but the tables are not in the default datasource it tries to bind the relation to the default datasource. In JDBCCMRFieldBridge.java it should set the default Datasource for the relation from the JDBCEntityBridge.java. If it is table mapping and the datasource is supplied then it should be ignored. Dave, you lost me. If your are using a foreign-key-mapping the datasorce present in JDBCCMRFieldBridge should not be used. Is it being used? If it is, where? -dain ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Has the CCE problem been fixed?
There is a patch for 1 of the cases of CCE. There is also a bug in Sun's JVM that we can not hack around. JRockit does not have this problem. On Tue, 2002-06-18 at 14:49, Dain Sundstrom wrote: It has. Marc is still playing catch-up with his email. -dain Jason Dillon wrote: I thought Scott said this was fixed? what is the story? --jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of marc fleury Sent: Tuesday, June 18, 2002 11:01 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-dev] Has the CCE problem been fixed? run jrockit marcf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Dillon Sent: Monday, June 17, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: [JBoss-dev] Has the CCE problem been fixed? If so has the fixed been integrated into Branch_3_0, if so when? --jason -- Dain Sundstrom Chief Architect JBossCMP JBoss Group, LLC Bringing you mounds of caffeinated joy http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development Bringing you mounds of caffeinated joy http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] http transport
The HTTP RMI tunning is the shits. Firstly there is no option to go with https without getting really ugly. Secondly, the whole cgi-script or servlet which then calls the local rmi listener generates two network calls for lookup. Since jetty is running in the container the servlet lookup should be a local JNDI lookup. If you read Holger's web site (http://smartcc.sourceforge.net) he is trying to cleanup EJB transport issues when firwalls are in the way. I hope somebody with more knowledge than me steps up to the plate. I for 1 will be using this stuff.. On Fri, 2002-06-21 at 08:36, Bill Burke wrote: JDK already has built in RMI HTTP tunneling. Why would we need this transport? Here's directions: http://www.dmh2000.com/ApacheTomcatRMI.htm Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Holger Engels Sent: Friday, June 21, 2002 5:00 AM To: [EMAIL PROTECTED] Subject: [JBoss-dev] http transport I try to understand, how a http transport can be implemented within jboss .. so what do I need? on the server side: o a connector servlet / extra http deamon, that accepts invocations embedded in http posts. the result of a home invocation is a handle. subsequent invocations (remote interface) contain the handle to identify the target ejb. the servlet is completely stateless. o an mbean service, that manages the servlet / http deamon on the client: o some interceptor (the last one in the chain), that marshalls the invocation as an http post request and demarshalls results / throwables. I call it the 'Transport' o is a special handle implementation required? o usertransaction handling is transparent (part of Invocation)? configuration: o it's the server's job to provide the connector servlet. the servlet doesn't need to be configured. the invocations carry all the information that is required to perform home-/ remote-invocations. o the client will do a lookup first (coded name, declared in the application-client descriptor). it then gets a dynamic proxy passing on the java style invocation to the invocation handler. the invocation handler feeds the invocation into the interceptor chain. this chain has to be configured somehow (during deployment of the application-client jar). o afaik there's no application client deployment at the moment and the client side interceptors are configured from the server, right? so what makes up the whole interceptor chain? we distinguish: o client side interceptors o server side interceptors (synchronization, pooling / caching, security) o symmetric interceptors (encryption / decryption for instance) the overall configuration of the (ordered) interceptor chain is made of component aspects and reference aspects. transport is just another aspect of the reference. authentication: in the smartcc, using the http transport requires a http login module (basic/digest auth) to be configured. the authentication task is performed by the servlet container. the container cares about setting up the security association. dain asked for an http plugin for jndi. my question: why do I need the server side's jndi content on the client if I don't lookup homes? what does a java client need beside what's configured in the application client descriptor. what am i missing? holger --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] http transport
Snip ... You mean no url provider, but jndi.properties (=environment)? OK. But I can't live with global jndi.properties. I need them on a per *-ref basis, because the components I connect are spreaded across several different application servers. It would seem that you would still want a global JNDI directory with 1 point of entry. This could be a JNDI mbean that does nothing else than sit infront of all of your other application servers and keeps references to all the other beans in the other applcation severs JNDI directories. When a request came in it could lookup the actual reference, wrap in up in a proxy and hand it back. The proxy would then know which application server it would talk to. I think hard coding aliases into *-refs is a bad idea. It would be a maintence nightmare. A global lookup location would be way easier. So your jndi.properties would only have to get you to the global JNDI directory at boot time. These properties could change based on each client logging in and loading a profile. Crawling back under my rock ... --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] secure JNDI with http invoker
I am trying to use the http invoker with the NamingContextFactory in jboss 3.2 beta I have the following properties Properties p = System.getProperties(); p.put(Context.INITIAL_CONTEXT_FACTORY,org.jboss.naming.HttpNamingContextFactory); p.put(Context.PROVIDER_URL,jnp://localhost:8080/invoker/restricted/JNDIFactory); p.put(Context.URL_PKG_PREFIXES,org.jboss.naming:org.jnp.interfaces); System.setProperties(p); I am getting back Root exception is java.io.StreamCorruptedException: InputStream does not contain a serialized object I believe the problem is that HttpNamingContextFactory is missing the Authenticator code that is in HttpInvokerProxy and the request is sending back an authenication failure. So am I using the right naming facory and if I am why is in the server jar files instead of the client jar files? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Jetty bug rear's it's head again
Throw Form based authentication on the jmx-console in the default jboss setup. I'm sure you know the syntax ;-) Jules Gosnell wrote: Dave Smith wrote: JBOss 3.2 beta (CVS) If you are doing form based authenication you get a redirection error. ie when jetty goes to load the form page it thinks it need's to authorize this page .. goes into an endless loop and then you get an htp error. Jules? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development mail me a simple testcase and I'll sort it out. Jules --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Jetty bug rear's it's head again
Ah .. With the old version of jetty you did not have to prefix the form-login-page with a '/'. If you include the slash it works. On Wed, 2002-10-30 at 14:56, Scott M Stark wrote: You will have to be more specific because when I add this the following to the jmx-console/WEB-INF/web.xml descriptor FORM based auth works fine. security-constraint web-resource-collection web-resource-nameHtmlAdaptor/web-resource-name descriptionAn example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application /description url-pattern/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameJBossAdmin/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameJBoss JMX Console/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginFailed.jsp/form-error-page /form-login-config /login-config Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 6:07 PM Subject: Re: [JBoss-dev] Jetty bug rear's it's head again Throw Form based authentication on the jmx-console in the default jboss setup. I'm sure you know the syntax ;-) --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Dependencies jboss 3.2 beta
I have a -service.xml file that has an mbean that depends on an ejb. My line looks like dependsjboss.j2ee:jndiName=cadex/Transferhead,service=EJB/depends Now the problem is that some off the method signatures in the MBean contain references to the EJB and thus when the Mbean is created I am getting a java.lang.NoClassDefFoundError. Now I can hack around this but it does not make sense to have dependencies if you have to hack around them. A quick peek at the code shows the create method is being called and then the create method in the service control checks to see if the mbean has dependices and should be created/started. This seems backward. Should we not first check to see the dependices are met and if they are not simply register the name and do not try to instaniate the class. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] http deployer - 3.2 CVS
JBOSS 3.2 CVS (Last night) Linux 2.2 / JVM 1.3.1/Blackdown I am testing the http to deploy an ear. Deploy .. lynx -dump http://localhost:8082/InvokeAction//jboss.system:service=MainDeployer/action=deploy?java.lang.String%2Bjava.lang.String=file:/home/dave/import/rns/..//rns/tests/dist/rnsTest.ear Then undeploy lynx -dump http://localhost:8082/InvokeAction//jboss.system:service=MainDeployer/action=undeploy?java.lang.String%2Bjava.lang.String=file:/home/dave/import/rns/..//rns/tests/dist/rnsTest.ear When I undeploy I get the following WARNINGS in the container 12:56:04,585 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:///home/dave/import/rns/..//rns/tests/dist/rnsTest.ear 12:56:04,604 WARN [DeploymentInfo] Not deleting localUrl, it is null or not a copy: file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/rnsTest.war 12:56:04,615 INFO [MainDeployer] Undeployed file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/rnsTest.war 12:56:04,629 WARN [DeploymentInfo] Not deleting localUrl, it is null or not a copy: file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/candata_test_util.jar 12:56:04,639 INFO [MainDeployer] Undeployed file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/candata_test_util.jar 12:56:04,654 WARN [DeploymentInfo] Not deleting localUrl, it is null or not a copy: file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/junit.jar 12:56:04,665 INFO [MainDeployer] Undeployed file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/junit.jar 12:56:04,678 WARN [DeploymentInfo] Not deleting localUrl, it is null or not a copy: file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/rns-test.jar 12:56:04,689 INFO [MainDeployer] Undeployed file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/rns-test.jar 12:56:04,696 WARN [DeploymentInfo] Not deleting localUrl, it is null or not a copy: file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/cactus.jar 12:56:04,698 INFO [MainDeployer] Undeployed file:/home/dave/ejb/server/default/tmp/deploy/home/dave/import/rns/../rns/tests/dist/rnsTest.ear/92.rnsTest.ear-contents/cactus.jar 12:56:04,702 INFO [DeploymentInfo] Cleaned Deployment: file:///home/dave/import/rns/..//rns/tests/dist/rnsTest.ear 12:56:04,703 INFO [MainDeployer] Undeployed file:///home/dave/import/rns/..//rns/tests/dist/rnsTest.ear And the tmp directory entries are not removed. So why does it think it is not a copy? I am also seeing a problem reading the jar enrty on deploy but I am still working on a test case, but it is intermittent and I am wondering if this is the same problem. PS. After looking at the URL I thought the ..// would be possibly causing the problem ... took it out and got the same thing. --- 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-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] standardjbosscmp-jdbc.xml
Could someone please add the numeric type to PostgreSQL in standardjbosscmp-jdbc.xml mapping java-typejava.math.BigDecimal/java-type jdbc-typeNUMERIC/jdbc-type sql-typeNUMERIC/sql-type /mapping ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Am I a clown?
Putting on his big shoes ... HashMap is not syncnronized, possible another thread is modifing the HashMap? or You are modifing the set inside the loop? marc fleury wrote: So I just spent 2 hours spotting the following interesting bug HashMap deployments ... Iterator it = deployments.keySet().iterator(); while (it.hasNext()); { do something(); } which would peg my CPU at 100% and never reach do something ... man I am a clown... can you see it? 2 hours! marcf __ View this jboss-dev thread in the online forums: http://jboss.org/forums/thread.jsp?forum=66thread=6868 ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] more standardjboss-cmp.xml
For postgresql the Boolean mapping is wrong. Should be mapping java-typejava.lang.Boolean/java-type jdbc-typeBIT/jdbc-type sql-typeBOOLEAN/sql-type /mapping ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] more standardjboss-cmp.xml
Hmm.. What version of the postgresql JDBC driver are you using. I am running the newest one and it seems to work here. I will do a little investigating. Dain Sundstrom wrote: This doesn't work. Postgres throws an exception Unknown Types on BIT. -dain -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: [JBoss-dev] more standardjboss-cmp.xml For postgresql the Boolean mapping is wrong. Should be mapping java-typejava.lang.Boolean/java-type jdbc-typeBIT/jdbc-type sql-typeBOOLEAN/sql-type /mapping ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Bug in relations
I was testing the current state of the relation code and I believe I have stumbled across a bug. If the primary key class of relationship is different then it bombs. So if you have table_a and table_b in a 1-1 uni-directional relationship with table_a primary key class of TableAPk and table_b primary key class TableBPk it bombs. It looks like the problem is in JDBCCMRFieldBridge.java around line 780. When it is creating and setting the primary key of the CMRField. fk = foreignKeyFields[i].setPrimaryKeyValue(fk, fieldValue); The problem is that if fk is null it creates a Pk class but in foreignKeyFields the entity is current class not the related one. So for TableA CMR field is is creating a class of TableAPk not TableBPk. I added the this before the call and it seems to work if(fk == null) fk=relatedManager.getEntityBridge().createPrimaryKeyInstance(); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Problems with 'jboss-mq' and autodeployer
The name space has changed. It is now jboss.system not JBOSS-SYSTEM. Brian Weaver wrote: Ok, I'm at a loss as to what's going on in the JBossMQ module of CVS. I've been making changes to the underlying OIL transport module of JBoss and I still need to propagate those changes to the UIL transport code. I've been working by checking out the 'jboss-all' module from CVS so that I could run the testsuite code before I checked in any changes. Everything seems to work fine when JBoss is checked out as a whole. However, when I check out the 'jboss-mq' module from CVS anonymously, build it, and then run the server it doesn't deploy! No TCP/IP ports (or UDP/IP for that matter) are opened. So there's no endpoints for RMI to provide access to JNDI or the messaging transports. I'm going to try to blunder my way around the code, but if someone could provide some useful insight on where to look I would greatly appreciate it. I'm using a vanilla checkout of the jboss-mq module. Also, if you do a checkout of jboss-mq and then build, be sure to link the thirdparty/gnu/getopt/lib/getopt.jar into the lib directory or it will not run. Somethings amiss with the build.xml so that getopt.jar is not being added to the lib directory. I've sent an e-mail to the two individuals that built and modified the file asking for direction/help in that matter already. Below is the last few lines of the server log. Prehaps it will be of use to those who understand the autodeployer code better than I. Thanks Weave -- truncated server.log - 2002-01-14 08:27:40,215 TRACE [org.jboss.system.ServiceLibraries] Libraries adding URLClassLoader 956609115 key URL file:/home/weave/OpenNMS/jboss/jboss-mq.pserver/build/output/jbossmq-1.0.0Beta/lib/ext/jnpserver.jar 2002-01-14 08:27:40,215 DEBUG [org.jboss.deployment.ServiceDeployer] deployed classes for file:/home/weave/OpenNMS/jboss/jboss-mq.pserver/build/output/jbossmq-1.0.0Beta/lib/ext/jnpserver.jar 2002-01-14 08:27:40,216 DEBUG [org.jboss.deployment.ServiceDeployer] about to copy 0 local directories 2002-01-14 08:27:40,216 DEBUG [org.jboss.deployment.ServiceDeployer] addMBeans: url file:/home/weave/OpenNMS/jboss/jboss-mq.pserver/build/output/jbossmq-1.0.0Beta/conf/default/jboss-service.xml 2002-01-14 08:27:40,219 DEBUG [org.jboss.deployment.ServiceDeployer] deploying with ServiceController mbean mbean code=org.jboss.deployment.AutoDeployer name=JBOSS-SYSTEM:service=AutoDeployer attribute name=Deployers JBOSS-SYSTEM:service=ServiceDeployer; /attribute attribute name=URLs ../deploy/lib, ../deploy /attribute attribute name=Timeout 3000 /attribute /mbean 2002-01-14 08:27:40,225 DEBUG [org.jboss.system.ServiceCreator] About to create bean: JBOSS-SYSTEM:service=AutoDeployer 2002-01-14 08:27:40,266 DEBUG [org.jboss.system.ServiceCreator] Created bean: JBOSS-SYSTEM:service=AutoDeployer 2002-01-14 08:27:40,274 DEBUG [org.jboss.system.ServiceConfigurator] Deployers set to JBOSS-SYSTEM:service=ServiceDeployer; in JBOSS-SYSTEM:service=AutoDeployer 2002-01-14 08:27:40,277 DEBUG [org.jboss.system.ServiceConfigurator] URLs set to ../deploy/lib, ../deploy in JBOSS-SYSTEM:service=AutoDeployer Looking for JBOSS-SYSTEM:service=ServiceDeployer 2002-01-14 08:27:40,277 DEBUG [org.jboss.system.ServiceConfigurator] Timeout set to 3000 in JBOSS-SYSTEM:service=AutoDeployer 2002-01-14 08:27:40,278 DEBUG [org.jboss.system.ServiceConfigurator] found 0 depends elements 2002-01-14 08:27:40,279 INFO [org.jboss.deployment.AutoDeployer] Initializing 2002-01-14 08:27:40,281 INFO [org.jboss.deployment.AutoDeployer] Initialized 2002-01-14 08:27:40,282 INFO [org.jboss.deployment.AutoDeployer] Starting 2002-01-14 08:27:40,285 DEBUG [org.jboss.deployment.AutoDeployer] Deployer 'JBOSS-SYSTEM:service=ServiceDeployer' isn't yet registered files for this deployer will not be deployed until it is deployed. 2002-01-14 08:27:40,287 DEBUG [org.jboss.deployment.AutoDeployer] Watching dir: /home/weave/OpenNMS/jboss/jboss-mq.pserver/build/output/jbossmq-1.0.0Beta/deploy/lib 2002-01-14 08:27:40,290 DEBUG [org.jboss.deployment.AutoDeployer] Watching dir: /home/weave/OpenNMS/jboss/jboss-mq.pserver/build/output/jbossmq-1.0.0Beta/deploy 2002-01-14 08:27:40,295 INFO [org.jboss.deployment.AutoDeployer] Started 2002-01-14 08:27:40,296 INFO [org.jboss.system.Server] Started in 0m:2s:124ms 2002-01-14 08:53:28,291 INFO [org.jboss.system.Server] Shutting down all services 2002-01-14 08:53:28,293 INFO [Default] Shutting down 2002-01-14 08:53:28,294 INFO [org.jboss.system.ServiceController] Stopping 2 services 2002-01-14 08:53:28,297 DEBUG [org.jboss.system.ServiceController] removing service: jboss.system:service=ServiceDeployer See removing it here as jboss.system:service=ServiceDeployer 2002-01-14 08:53:28,297 DEBUG
[JBoss-dev] More relationship stuff
I've pulled the latest jboss head and I am testing a 1-1 uni directional relationship. The database tables are already created. So I have create table test_cust ( test_cust_id int PRIMARY KEY, billing_address_id int ); create table test_address ( test_address_id int PRIMARY KEY, an_address varchar(50) ); So TestCust .. TestCust { AddressLocal getAddress(); void setAddress(AddressLocal l); } jbosscmp-jdbc.xml sniped .. ejb-relation ejb-relation-nameUni_1_to_1/ejb-relation-name foreign-key-mapping ejb-relationship-role ejb-relationship-role-nameCust_has_an_address/ejb-relationship-role-name fk-constrainttrue/fk-constraint foreign-key-fields foreign-key-field field-nametest_address_id/field-name column-namebilling_address_id/column-name /foreign-key-field /foreign-key-fields /ejb-relationship-role ejb-relationship-role ejb-relationship-role-nameAddr_has_no_idea_of_TestCust/ejb-relationship-role-name /ejb-relationship-role /foreign-key-mapping /ejb-relation So everything looks cool until it tries to add the address INSERT INTO test_address (test_address_id, an_address, TestCust_address) VALUES (?, ?, ?) It looks like jboss is throwing in a CMR field even though it is only a 1-1 uni directional relationship. Bug? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] [Fwd: ScanMail Message: To Sender, sensitive content found and action t aken.]
Me to. Guess I said pulled? Christian Riege wrote: he, upon my last CVS commit (and the following e-mail by SF) I got the attached reply. who the fuck (!) are these clowns? sorry for the spam ;) christian Subject: ScanMail Message: To Sender, sensitive content found and action t aken. From: System Attendant [EMAIL PROTECTED] Date: Thu, 17 Jan 2002 11:43:15 -0600 To: 'Christian Riege' [EMAIL PROTECTED] Trend SMEX Content Filter has detected sensitive content. Place = [EMAIL PROTECTED]; ; Sender = Christian Riege Subject = [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins AbstractInstanceCache.java Delivery Time = January 17, 2002 (Thursday) 11:43:13 Policy = Anti-Spam Action on this mail = Quarantine message Warning message from administrator: Anti-Spam filter has blocked a junk mail! ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] JAAS with MDB
I am trying to get a MDB working with JAAS. Currently when message delivery is attempted it throws an error Authentication exception, principal=null. Now in the jms-service.xml I have added attribute name=PrincipalMappingProperties UserName=jboss Password=jboss1 /attribute but this does not do anything. I can not find any refences to this in either the free or purchased docs. Can some one point me in the right direction. time passes ... After further investigation it looks like it is not implemented. In the JMSContainerInvoker it creates the method invocation with principal and credential = null. Then when the SecurityInterceptor gets a hold of it barfs. The snip, line 976 of JMSContainerInvoker.java invoker.invoke(id, // Object id - where used? ON_MESSAGE, // Method to invoke new Object[]{message}, // argument tm.getTransaction(), // Transaction null, // Principal null); // Cred How should I go about getting this to work? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JAAS with MDB
It actually goes a little furthur than that. I first tried to take out the security interceptor in the MDB interceptior chain. This works fine util your message bean then tries to call another EJB. So it would seem that the Security Interceptor needs to just act as a login for the MDB. Scott M Stark wrote: MDBs need a different SecurityInterceptor that does not attempt to authenticate the caller as there is none defined. An extension would allow the caller to be obtained from JMS message properties. The properties could be specified in the jboss.xml descriptor in the message-driven bean section. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 2:08 PM Subject: [JBoss-dev] JAAS with MDB I am trying to get a MDB working with JAAS. Currently when message delivery is attempted it throws an error Authentication exception, principal=null. Now in the jms-service.xml I have added attribute name=PrincipalMappingProperties UserName=jboss Password=jboss1 /attribute but this does not do anything. I can not find any refences to this in either the free or purchased docs. Can some one point me in the right direction. time passes ... After further investigation it looks like it is not implemented. In the JMSContainerInvoker it creates the method invocation with principal and credential = null. Then when the SecurityInterceptor gets a hold of it barfs. The snip, line 976 of JMSContainerInvoker.java invoker.invoke(id, // Object id - where used? ON_MESSAGE, // Method to invoke new Object[]{message}, // argument tm.getTransaction(), // Transaction null, // Principal null); // Cred How should I go about getting this to work? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JAAS with MDB
So then in JMSContainerInvoker add the code to read the jboss metadata and then invoke the inteceptor chain with the appropreate princpal and credidentals? Or should the JMS message actually set properties in the message itself and a new Security Invoker to read this info and set the principal and credidents. I have some time today and tomorrow to take a crack at it. Scott M Stark wrote: Which is what I mean by MDBs needing a different SecurityInterceptor. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: Scott M Stark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 7:47 AM Subject: Re: [JBoss-dev] JAAS with MDB It actually goes a little furthur than that. I first tried to take out the security interceptor in the MDB interceptior chain. This works fine util your message bean then tries to call another EJB. So it would seem that the Security Interceptor needs to just act as a login for the MDB. Scott M Stark wrote: MDBs need a different SecurityInterceptor that does not attempt to authenticate the caller as there is none defined. An extension would allow the caller to be obtained from JMS message properties. The properties could be specified in the jboss.xml descriptor in the message-driven bean section. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JAAS with MDB
OK. So I had a quick peek at the SpyMessage and there is a field called producerClientId that should do the trick. So I add an interceptor in front of the security interceptor that takes the first argument of the invoke , casts to a SpyMessage, grabs the id and sets the Principal in the method invocation and continues along the chain. Will the only type of message delivered to the invoker be a SpyMessage? or can it handle other messages that could cause a class cast error? Scott M Stark wrote: Authentication and Authorization need to be two seperate security interceptors. Authentication needs to validate the principal and associate the Subject with the MethodInvocation. The Authorization interceptor will handle role based permissions and run-as identities. The default MDB interceptor chain should not include an Authentication interceptor. If the jboss.xml metadata is enchanced to allow for caller identity to be obtained from the JMS msg than the container invoker will associate this information with the call and the Authentication interceptor can be added to the interceptor chain. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: Scott M Stark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 8:56 AM Subject: Re: [JBoss-dev] JAAS with MDB So then in JMSContainerInvoker add the code to read the jboss metadata and then invoke the inteceptor chain with the appropreate princpal and credidentals? Or should the JMS message actually set properties in the message itself and a new Security Invoker to read this info and set the principal and credidents. I have some time today and tomorrow to take a crack at it. Scott M Stark wrote: Which is what I mean by MDBs needing a different SecurityInterceptor. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dave Smith [EMAIL PROTECTED] To: Scott M Stark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 7:47 AM Subject: Re: [JBoss-dev] JAAS with MDB It actually goes a little furthur than that. I first tried to take out the security interceptor in the MDB interceptior chain. This works fine util your message bean then tries to call another EJB. So it would seem that the Security Interceptor needs to just act as a login for the MDB. Scott M Stark wrote: MDBs need a different SecurityInterceptor that does not attempt to authenticate the caller as there is none defined. An extension would allow the caller to be obtained from JMS message properties. The properties could be specified in the jboss.xml descriptor in the message-driven bean section. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JAAS with MDB
Glad to see someone else is reading this thread. After some more hacking we should come up with new login and password tags. The current mdb tags require that each MDB that needs a durable subscription has to have a unique user name and password. For the case of security this is overkill and most likely these beans will be run under one common alias login. (Same way that the jboss server runs under the user jboss but no one can login as jboss) How about .. mdb-authentication-user mdb-authentication-password Mike Swainston-Rainford wrote: Hi Scott I found these during my code read through and investigation of current jboss.xml elements. mdb-user, mdb-passwd and mdb-client-id and mdb-subscriptin-id are all loaded in MessageDrivenMetaData. JMSContainerInvoker uses getUser() getClientID() etc to access them. I've included these elements in the jboss_3_0.dtd i'm working on but haven't comitted to CVS yet. Mike At 16:20 31/01/2002, Scott M Stark wrote: I don't see any of the mdb-xxx fields you are talking about in the current code so these are all elements you added? I'm looking at version 1.42 of the JMSContainerInvoker.java. What is needed is the names of the JMS properties from which the principal and credentials are obtained. The princpal name and credential value are not specified in the jboss.xml descriptor. Roles are also not defined in jboss.xml as they are a by-product of authenticating the obtained principal and credentials. - Original Message - From: Dave Smith [EMAIL PROTECTED] To: Scott M Stark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 1:33 PM Subject: Re: [JBoss-dev] JAAS with MDB Ok. I have a hacked up version of JMSContainerInvoker working. Now currently we have mdb-user,mdb-password and mdb-subscription-id in the jboss.xml. These are used for durable subscriptions and are referenced in jbossmq-state.xml. Now should we add mdb-role and re-use this fields or should we add new elements say mdb-principal mdb-credentials and mdb-role? ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] data source problems (hosed?)
this really should be on user(next time) Check your jboss-service.xml to make sure the deployer names match, also in deploy/lib you need jboss-xa.rar, etc .. [EMAIL PROTECTED] wrote: When I deploy my mysql-service.xml file, it seems to wait for ever on these services that it depends on. The same thing happens when I deploy the hsql-default-service.xml file. I'm sure it is probably my fault somehow, but please help! when I deploy mysql-service.xml: 2002-02-01 11:18:27,160 INFO [org.jboss.system.ServiceController] waiting in create jboss.jca:service=ConnectionFactoryLoader,name=TEE_DS waiting on jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter 2002-02-01 11:18:27,162 INFO [org.jboss.system.ServiceController] waiting in start jboss.jca:service=ConnectionFactoryLoader,name=TEE_DS on jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter when I deploy hsql-default.xml: 2002-02-01 12:00:04,353 INFO [org.jboss.system.ServiceController] waiting in start jboss:service=ConnectionFactoryLoader,name=DefaultDS on jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter 2002-02-01 12:00:04,355 INFO [org.jboss.system.ServiceController] waiting in start jboss:service=ConnectionFactoryLoader,name=NoTransDS on jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter I've attached my mysql-service.xml and hsql-default-service.xml files. Thanks, Michael mysql-service.xml hsqldb-default-service.xml ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Status of ear deployment
I am using the current tip (9 am this morning). This ear deployed and worked before (the marc unified class loading) and now I am getting a class not found exception. Inside the war is WEB-INF/classes/tests/cadex/TestCompanyInfoBean.class and when I try to access it via a servlet I get (see below) known problem? bug ? Dumb user? Error finding class [tests.cadex.TestCom panyInfoBean] in classpath java.lang.ClassNotFoundException: tests.cadex.TestCompanyInfoBean at org.jboss.system.ServiceLibraries.loadClass(ServiceLibraries.java:405 ) at org.jboss.system.UnifiedClassLoader.loadClass(UnifiedClassLoader.java :101) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.cactus.server.AbstractTestCaller.getTestClassClass(Abstrac tTestCaller.java:331) at org.apache.cactus.server.AbstractTestCaller.getTestClassInstance(Abst ractTestCaller.java:302) at org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller .java:130) at org.apache.cactus.server.AbstractTestController.handleRequest(Abstrac tTestController.java:122) at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedi rector.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:327 ) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5 46) at org.mortbay.http.HttpContext.handle(HttpContext.java:1269) at org.mortbay.http.HttpContext.handle(HttpContext.java:1223) at org.mortbay.http.HttpServer.service(HttpServer.java:725) at org.mortbay.http.HttpConnection.service(HttpConnection.java:748) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:921) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:763) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 138) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287) at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715) at java.lang.Thread.run(Thread.java:484) ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] JBOSS @ JAVAONE TSHIRT CONTEST
If you are truly ripping off Mikey D's then it should be Over hitCount/ Billion Served marc fleury wrote: I like it we would do One Billion Served marcf |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Peter |Fagerlund |Sent: Thursday, February 07, 2002 5:33 AM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] JBOSS @ JAVAONE TSHIRT CONTEST | | | | | |JBoss ServeĀ“s All | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Mbean dependancies
Do we have any docs on this stuff? I'm tring to create a dependancy with a message driven Mbean that will wait until the topic it publishes is created and also wait until the EJB that it uses is deployed. From a quick look at the example with the TopicManager it looks like you have to create a an MBean attribute with type ObjectName that maps to the JMX service you need. If that is the case how would you tie it to an EJB? Head spinning in Toronto ... ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Mbean dependancies
OK. So a did a little digging and tried this .. dependsjboss.j2ee:service=EJB,jndiName=cadex/CompanyInfo/depends So it then delays startup but once the EJB is deployed it does not start the mbean. I'm I getting closer? Dave Smith wrote: Do we have any docs on this stuff? I'm tring to create a dependancy with a message driven Mbean that will wait until the topic it publishes is created and also wait until the EJB that it uses is deployed. From a quick look at the example with the TopicManager it looks like you have to create a an MBean attribute with type ObjectName that maps to the JMX service you need. If that is the case how would you tie it to an EJB? Head spinning in Toronto ... ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] message selectors
CVS as off 5pm EST Feb13 Jason Dillon wrote: What version of JBoss are you using? --jason On Wed, 2002-02-13 at 16:53, Dave Smith wrote: After having a bad day trying to get a message selector working for a topic listener I came across a few bugs. 1) If the message selector is invalid but the connection is not started but no error is thrown. So if you createTopicSession then createSubscriber and then start the connection the connection looks good but there are no messages delivered. (I spent most of the day trying to sort this one out) 2) The message selectors do not seem to like boolean types. My query is app_id='AK' and production=TRUE 3) What parser are we using for the message selectors. I thought we were using javacc and jms.jj. But in Selector the default is set to parser which is from jms.y. I don't even think this thing is getting re-processed. I did swicth the default to SelectorParser but that did not work as well. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] message selectors
Actually it's worse than that. If you change the default parser to SelectorParser, nothing works! So a simple slector like type='cadex' bombs. Jason Dillon wrote: I did not think we were using the old parser anymore... Is there a reason this is still around after Scott reimplemented in JavaCC? --jason On Wed, 2002-02-13 at 16:53, Dave Smith wrote: After having a bad day trying to get a message selector working for a topic listener I came across a few bugs. 1) If the message selector is invalid but the connection is not started but no error is thrown. So if you createTopicSession then createSubscriber and then start the connection the connection looks good but there are no messages delivered. (I spent most of the day trying to sort this one out) 2) The message selectors do not seem to like boolean types. My query is app_id='AK' and production=TRUE 3) What parser are we using for the message selectors. I thought we were using javacc and jms.jj. But in Selector the default is set to parser which is from jms.y. I don't even think this thing is getting re-processed. I did swicth the default to SelectorParser but that did not work as well. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] message selectors
OK. it looks like it does not like the BOOLEAN token as a combo fo the TRUE and FALSE tokens. Inlining them works. Patch inclosed. Now the selector will parse but still does not deliver it properly. Going to bed , have a look in the morning... Dave Smith wrote: Ok. First problem solved. We have to call the SelectorParser constructor with at least a string reader. The problem is when you go to run ReInit with the actual selector it throws a NPE. So in SelectorParser.jj add the following to the no-args constructor this(new StringReader()); Boolean slector still does not work ... looking Jason Dillon wrote: Can you please verify that things are still broken with the latest CVS (with the changes I just commited). Please submit a testcase, if you are in there and finding problems just throw something together and submit it. --jason On Wed, 2002-02-13 at 17:52, Dave Smith wrote: Actually it's worse than that. If you change the default parser to SelectorParser, nothing works! So a simple slector like type='cadex' bombs. Jason Dillon wrote: I did not think we were using the old parser anymore... Is there a reason this is still around after Scott reimplemented in JavaCC? --jason On Wed, 2002-02-13 at 16:53, Dave Smith wrote: After having a bad day trying to get a message selector working for a topic listener I came across a few bugs. 1) If the message selector is invalid but the connection is not started but no error is thrown. So if you createTopicSession then createSubscriber and then start the connection the connection looks good but there are no messages delivered. (I spent most of the day trying to sort this one out) 2) The message selectors do not seem to like boolean types. My query is app_id='AK' and production=TRUE 3) What parser are we using for the message selectors. I thought we were using javacc and jms.jj. But in Selector the default is set to parser which is from jms.y. I don't even think this thing is getting re-processed. I did swicth the default to SelectorParser but that did not work as well. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- SelectorParser.jj Wed Feb 13 23:59:07 2002 +++ SelectorParser.jj.new Wed Feb 13 23:58:48 2002 @@ -55,6 +55,7 @@ public SelectorParser() { +this(new StringReader()); } } PARSER_END(SelectorParser) @@ -72,9 +73,7 @@ TOKEN : { - TRUE: TRUE | true - | FALSE: FALSE | false - | BOOLEAN: TRUE | FALSE + BOOLEAN: TRUE | true | FALSE | false | NULL: NULL | null | AND: AND | and | NOT: NOT
Re: [JBoss-dev] message selectors
Go nuts. I have only used bison and flex and I have some pressing other stuff to do now. The current problem with the message selectors is that text is returned with the ' . So app_id='my app' turns into EQUAL( Start Identifier@app_id Start 'my app' Now it looks like the STRING token should not return the ' | STRING: ' ( (~[',\n,\r]) | ('') )* ' Go ahead and make the stuff case insensitive. Dain Sundstrom wrote: According to the JMS spec the reserved words are case insensitive. A part of the TOKEN spec I use in the new EJB-QL parser follows: TOKEN [IGNORE_CASE] : /* RESERVED WORDS */ { FALSE: FALSE | NOT: NOT | NULL: NULL | TRUE: TRUE } The boolean declaration won't work because you have the same regular expression in two sections. Remember that token is part of the lexing step where the input stream is broken into logical token. Then the syntax part happens. If you need a production later in the grammar which can be true or false, you would add the following bnf_prduction: void Boolean() : {} { (TRUE | FALSE) } I'm by no means a JavaCC expert (I'm still learning it my self), but if you want, I'll look over your jj file when you finish. -dain Dave Smith wrote: OK. it looks like it does not like the BOOLEAN token as a combo fo the TRUE and FALSE tokens. Inlining them works. Patch inclosed. Now the selector will parse but still does not deliver it properly. Going to bed , have a look in the morning... Dave Smith wrote: Ok. First problem solved. We have to call the SelectorParser constructor with at least a string reader. The problem is when you go to run ReInit with the actual selector it throws a NPE. So in SelectorParser.jj add the following to the no-args constructor this(new StringReader()); Boolean slector still does not work ... looking Jason Dillon wrote: Can you please verify that things are still broken with the latest CVS (with the changes I just commited). Please submit a testcase, if you are in there and finding problems just throw something together and submit it. --jason On Wed, 2002-02-13 at 17:52, Dave Smith wrote: Actually it's worse than that. If you change the default parser to SelectorParser, nothing works! So a simple slector like type='cadex' bombs. Jason Dillon wrote: I did not think we were using the old parser anymore... Is there a reason this is still around after Scott reimplemented in JavaCC? --jason On Wed, 2002-02-13 at 16:53, Dave Smith wrote: After having a bad day trying to get a message selector working for a topic listener I came across a few bugs. 1) If the message selector is invalid but the connection is not started but no error is thrown. So if you createTopicSession then createSubscriber and then start the connection the connection looks good but there are no messages delivered. (I spent most of the day trying to sort this one out) 2) The message selectors do not seem to like boolean types. My query is app_id='AK' and production=TRUE 3) What parser are we using for the message selectors. I thought we were using javacc and jms.jj. But in Selector the default is set to parser which is from jms.y. I don't even think this thing is getting re-processed. I did swicth the default to SelectorParser but that did not work as well. ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- SelectorParser.jjWed Feb 13 23:59:07 2002 +++ SelectorParser.jj.newWed Feb 13 23:58:48 2002 @@ -55,6 +55,7 @@ public SelectorParser() { +this(new StringReader()); } } PARSER_END(SelectorParser) @@ -72,9 +73,7 @@ TOKEN : { - TRUE: TRUE | true - | FALSE: FALSE | false - | BOOLEAN: TRUE | FALSE + BOOLEAN: TRUE | true | FALSE | false | NULL: NULL | null | AND: AND | and | NOT: NOT ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development