[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-30 Thread vharcq

  User: vharcq  
  Date: 01/06/30 05:37:05

  Modified:src/docs customizingjaws.xml
  Log:
  Add pk-constraint description
  
  Revision  ChangesPath
  1.14  +6 -1  manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- customizingjaws.xml   2001/06/25 21:35:39 1.13
  +++ customizingjaws.xml   2001/06/30 12:37:05 1.14
  @@ -174,7 +174,7 @@
   update in the database the fields of your bean that have
  actually changed.
  
  -
  +  

  read-only: tells whether JAWS will allow client 
application to modify 
   the state of your beans. Default is false. If true, JAWS will
  @@ -201,6 +201,11 @@
   database performance problems.
  

  + 
  +   pk-constraint: when this option is turned on (off by 
default) JAWS will create
  +an primary key constraint on the Primary Key fields : CREATE TABLE xxx (pk 
INTEGER,a VARCHAR(256),b VARCHAR(256),CONSTRAINT pkxxx PRIMARY KEY (pk)))
  +   
  +  
 
 Each of these options can be set either generally (it will affect JAWS 
for your whole application) 
   or on a per bean basis, or both of these. JAWS will always read the defaults in 
standardjaws.xml first, then 
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-24 Thread vharcq

  User: vharcq  
  Date: 01/06/24 14:39:03

  Modified:src/docs customizingjaws.xml
  Log:
  Added chapter/example on Dependant Value Object
  
  Revision  ChangesPath
  1.12  +80 -0 manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- customizingjaws.xml   2001/06/24 09:59:00 1.11
  +++ customizingjaws.xml   2001/06/24 21:39:03 1.12
  @@ -615,4 +615,84 @@
   find you have to modify it, please consider sharing your changes:
   post the modified mapping on the jbosscmp mailing list.
  
  +   
  +  Dependant Value Objects [since JBoss 2.4]
  + Author: 
  +
  +   Vincent
  +   Harcq
  +
  +[EMAIL PROTECTED]
  + 
  +   Standards compliance note: this feature is not standard or required in 
EJB 1.1. Therefore, EJBs that 
  +use this feature, might not be compile-free portable to other EJB containers.
  +  JAWS store non primitive type fields as Object in the database.  When 
the field is a JavaBean, an object with 
  +  some primitive type attributes with getter/setter accessing methods, it is 
possible to store the value of these attributes
  +instead of the whole object.
  +For example suppose in the Class bean, we have a field "lesson" representing 
the subject (english, mathematics,..)
  +and the number of hours that the teacher take to give its lesson.  This field is an 
simple JavaBean:
  +
  +The ejb-jar.xml will still define "lesson" as the CMP field:
  +
  +But jaws.xml will say how to store/retrieve
  +the object:
  +
  +Two database fields are now used to store the "value" of the object.  The 
trick is to have getter/setter method
  +corresponding to what you have to store/retrieve.
  +This feature is recursive, so you can have something like 
lesson.subject.name, lesson.subject.group,...
  +Notice that if the dependant object defines its attributes as "public", the 
getter/setter methods are not necessary.
  +This can be used in an entity bean to store a reference to another entity bean by 
its Primary Key object.  Indeed, in
  +this case, the primary key fields are declared as public in the PK class.
  +Finally notice that even if this a non standard requirement in EJB 1.1, there 
is a way to program this in a standard way.
  +This is to define the 2 CMP fields in the bean and access them through 
getter/setter method of "LessonDetail" type.
  +These will map the database fields to the object and vice versa.  A more performant 
solution is to keep a private "LessonDetail"
  +attribute in the bean that is construct in the ejbLoad() method.
  +   
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-24 Thread vharcq

  User: vharcq  
  Date: 01/06/24 02:59:00

  Modified:src/docs customizingjaws.xml
  Log:
  Chapter 5 : added ONE example
  Match the doco with the example.
  
  Revision  ChangesPath
  1.11  +99 -89manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- customizingjaws.xml   2001/06/23 16:12:29 1.10
  +++ customizingjaws.xml   2001/06/24 09:59:00 1.11
  @@ -56,12 +56,25 @@
 If you want to know everything about jaws.xml, see the Jaws.xml DTD. 
The 
   general structure of the jaws.xml can be found here. All parts of
   this file are optional: you only provide what you need!
  +
  +   The full source code to accompany this chapter can be found 
  +   in zip format (documentation-example.zip) or tar/gzip 
(documentation-example.tar.gz) format 
  +   from the file section of the documentation section
  +   on http://www.jboss.org/doco_files/";>http://www.jboss.org/doco_files/.
  +   Download this file and extract it to any directory.  Open a DOS/Shell 
box under the "build"
  +subdirectory.  Now specify 3 environment variables JBOSS_HOME, ANT_HOME and 
JAVA_HOME that must refer
  +respectively to the JBoss installation directory, the Ant installation directory 
and the JDK installation
  +directory.
  + Run "build cmp-jaws-compile" from the "build/" subdirectory.  
This will create a ejb jar
  +"documentation-example/build-examples/cmp-jaws/ejb/class.jar".  Drop it in the 
"deploy" directory of your
  +JBoss installation.  This example shows all possibilities described in this 
chapter.  You may wqnt to change
  +the files as you read this chapter, simply rebuild in EJB jar and deploy it to see 
the changes.
  
  
 Specifying a datasource
 A datasource is, mainly, a database plus a driver plus a connection 
pool. By 
   default, jboss uses the Hypersonic datasource. To add another
  -datasource, you have to declare it as a JMX MLet: see .
  +datasource, you have to declare it as a JMX MLet: see Chapter 3.
 The second ARG of this MLet is the JNDI name of the datasource, i.e. 
the name 
   you have to use to access it. To tell JAWS to use this
   datasource, simply add in your jaws.xml file a 
 Settings for a bean: to set an option for a particular bean, do it in 
the 
   corresponding 
 
 
Example 1
  - You create an entity bean that will represent a customer. You 
  + You create an entity bean that will represent a class. You 
   already have the table in your database, it was created using the
   following SQL statement:
  - CREATE TABLE CUSTOMER (NAME VARCHAR(20), ADDRESS VARCHAR(100), PHONE 
VARCHAR(20));
  + CREATE TABLE CLASS (ID INTEGER, TEACHER VARCHAR(100), STUDENTNBR 
INTEGER);
This is how the your xml file will look like:

 
   
 
Example 2
  - Your bank account bean has a String field to hold the VISA card 
  -number. You don't want to use the default mapping for a String
  -(VARCHAR(256)) since a VISA Card number is not that long. Your xml file will 
  + Your Class bean has a String field to hold the Teacher name. 
  + You don't want to use the default mapping for a String
  +(VARCHAR(256)) since a name is not that long. Your xml file will 
   look like this:

Note that the contents of the 
You want to define a method in ClassHome:  
  -   public Collection findBigClasses(int minStudentCount, 
String teacher)
  -  throws FinderException;
  + 
  +public Collection findBigClasses(Integer minStudentCount, String teacher)
  +throws FinderException, RemoteException;
 
Your jaws.xml file will contain the following:

Then a call to findBigClasses(100, "Jones") will generate
SELECT classId FROM ClassBean
  -  WHERE studentCount > 100 AND teacherName = Jones
  +  WHERE studentCount > 100 AND teacherName = 'Jones'
 ORDER BY studentCount DESC;
 
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-23 Thread vharcq

  User: vharcq  
  Date: 01/06/23 09:12:29

  Modified:src/docs customizingjaws.xml
  Log:
  JBoss 2.2 Compliance (not really a lot to do as there is no example in this chapter)
  
  Revision  ChangesPath
  1.10  +35 -6 manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- customizingjaws.xml   2001/06/22 03:47:40 1.9
  +++ customizingjaws.xml   2001/06/23 16:12:29 1.10
  @@ -7,9 +7,18 @@
 
 [EMAIL PROTECTED]
  
  +   JBoss 2.2 compliance checked by:
  + Vincent
  + Harcq
  + 
  + [EMAIL PROTECTED]  
  +   
  + 
  
 Introduction
  -  JAWS is the O/R mapper used by JBoss to manage CMP entity beans. JAWS 
is configured in a file named standardjaws.xml, located in the conf/config-name 
directory in the JBoss distribution. The default config-name is 
default.
  +  JAWS is the O/R mapper used by JBoss to manage CMP entity beans. JAWS 
is configured in a file 
  +  named standardjaws.xml, located in the conf/config-name directory in the 
JBoss distribution. 
  +  The default config-name is default.
   
   This file configures JAWS for all JBoss. You can then extend
   this configuration on a per-application basis by putting a jaws.xml
  @@ -52,7 +61,7 @@
 Specifying a datasource
 A datasource is, mainly, a database plus a driver plus a connection 
pool. By 
   default, jboss uses the Hypersonic datasource. To add another
  -datasource, you have to declare it as a JMX MLet: see the manual.
  +datasource, you have to declare it as a JMX MLet: see .
 The second ARG of this MLet is the JNDI name of the datasource, i.e. 
the name 
   you have to use to access it. To tell JAWS to use this
   datasource, simply add in your jaws.xml file a  
tag. There are two options. The first presented here conforms to SQL92 and is the more 
generic and portable one. The second presented here is defined by T-SQL and is useful 
for MS Access 97 (and maybe more databases I'm not aware of).
  +   Declare your finder in jaws.xml, using the  
tag. There are two options. The first presented here conforms to SQL92 and is the more 
generic and portable one. The second presented here is defined by T-SQL and is useful 
for MS Access 97 for example.
  Generic SQL92 example:
  

[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-21 Thread danch

  User: danch   
  Date: 01/06/21 20:47:40

  Modified:src/docs customizingjaws.xml
  Log:
  added brief/terse explanation of the interaction between read-ahead option and 
transactions
  
  Revision  ChangesPath
  1.9   +267 -259  manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- customizingjaws.xml   2001/06/16 00:49:32 1.8
  +++ customizingjaws.xml   2001/06/22 03:47:40 1.9
  @@ -1,15 +1,15 @@
   
   
  - Customizing JAWS
  - Author:
  - Sebastien
  - Alborini
  - 
  - [EMAIL PROTECTED]
  - 
  - 
  - Introduction
  - JAWS is the O/R mapper used by JBoss to manage CMP entity beans. 
JAWS is configured in a file named standardjaws.xml, located in the conf/config-name 
directory in the JBoss distribution. The default config-name is 
default.
  +   Customizing JAWS
  +   Author:
  + Sebastien
  + Alborini
  +  
  +  [EMAIL PROTECTED]
  +   
  +   
  +  Introduction
  +  JAWS is the O/R mapper used by JBoss to manage CMP entity beans. JAWS 
is configured in a file named standardjaws.xml, located in the conf/config-name 
directory in the JBoss distribution. The default config-name is 
default.
   
   This file configures JAWS for all JBoss. You can then extend
   this configuration on a per-application basis by putting a jaws.xml
  @@ -21,91 +21,91 @@
   directory of the jar archive.
   
   
  - Here is what you can do with standardjaws.xml / jaws.xml: 
  
  -
  - 
  -Specify a datasource and the 
type-mappings to use with it
  -   
  -
  - 
  -Set a bunch of options concerning jaws 
behavior
  -   
  -
  - 
  -Specify how JAWS should build/use your 
tables
  -   
  -
  - 
  -Define finders to access you entity beans
  -   
  -
  - 
  -Define a type mapping
  -   
  -
  - 
  - If you want to know everything about jaws.xml, see the Jaws.xml 
DTD. The 
  +  Here is what you can do with standardjaws.xml / jaws.xml:   
  + 
  + 
  +   Specify a datasource and the type-mappings to use with it
  +   
  +
  + 
  +   Set a bunch of options concerning jaws behavior
  +   
  +
  + 
  +   Specify how JAWS should build/use your tables
  +   
  +
  + 
  +   Define finders to access you entity beans
  +   
  +
  + 
  +   Define a type mapping
  +   
  +
  +  
  +  If you want to know everything about jaws.xml, see the Jaws.xml DTD. 
The 
   general structure of the jaws.xml can be found here. All parts of
   this file are optional: you only provide what you need!
  - 
  - 
  - Specifying a datasource
  - A datasource is, mainly, a database plus a driver plus a 
connection pool. By 
  +   
  +   
  +  Specifying a datasource
  +  A datasource is, mainly, a database plus a driver plus a connection 
pool. By 
   default, jboss uses the Hypersonic datasource. To add another
   datasource, you have to declare it as a JMX MLet: see the manual.
  - The second ARG of this MLet is the JNDI name of the datasource, 
i.e. the name 
  +  The second ARG of this MLet is the JNDI name of the datasource, i.e. 
the name 
   you have to use to access it. To tell JAWS to use this
   datasource, simply add in your jaws.xml file a 
  - According to the type of the database, you probably also want to 
specify a 
  +  According to the type of the database, you probably also want to 
specify a 
   type mapping for this datasource. A type mapping tells JAWS
   which jdbc types, which sql types to use for the storage of your cmp fields. 
   You just have to add a
  -
  - 
  -Hypersonic SQL
  -   
  -
  - 
  -InstantDB
  -   
  -
  - 
  -Oracle
  -   
  -
  -   

[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-15 Thread danch

  User: danch   
  Date: 01/06/15 17:49:32

  Modified:src/docs customizingjaws.xml
  Log:
  added doc for read-ahead option
  
  Revision  ChangesPath
  1.8   +42 -0 manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- customizingjaws.xml   2001/06/02 08:09:08 1.7
  +++ customizingjaws.xml   2001/06/16 00:49:32 1.8
  @@ -442,6 +442,48 @@
We strongly suggest you use SQL92 as default query 
language. T-SQL is provided for ease-of-use if you have existing T-SQL queries.

   
  +  
  + Advanced options for declared finders
  + Author:
  +
  +   Dan
  +   Christopherson
  +
  +[EMAIL PROTECTED] or [EMAIL PROTECTED]
  + 
  + As of JBoss version 2.3 beta (6/15/2001), it is possible to request
  + that JAWS preload data for all entities selected by a declared finder. This
  + avoids a performance problem where the database will be queried separately
  + to load data for each bean returned by the finder. To activate this 
  + optimization, simply add true to
  + your finder declaration. Note that as of the same version, you can override
  + this option for the autogenerated findAll method as well.
  + 
  + This is an example jaws.xml showing use of this 
option
  + 
  +  

Custom finders coded in your beans
Author: 
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-06-02 Thread gropi

  User: gropi   
  Date: 01/06/02 01:09:08

  Modified:src/docs customizingjaws.xml
  Log:
  Clarification on the location of jaws.xml when deploying with an ear
  archive. Thanks to Marco Bonechi for pointing this out.
  
  Revision  ChangesPath
  1.7   +9 -1  manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- customizingjaws.xml   2001/04/25 12:38:23 1.6
  +++ customizingjaws.xml   2001/06/02 08:09:08 1.7
  @@ -11,7 +11,15 @@
Introduction
JAWS is the O/R mapper used by JBoss to manage CMP entity beans. 
JAWS is configured in a file named standardjaws.xml, located in the conf/config-name 
directory in the JBoss distribution. The default config-name is 
default.
   
  - This file configures JAWS for all JBoss. You can then extend 
this configuration on a per-application basis by putting a jaws.xml file in the 
META-INF directory of your application. Upon deploying your beans, JAWS will first 
process the standardjaws.xml file, and then the jaws.xml file for your application if 
provided.
  +This file configures JAWS for all JBoss. You can then extend
  +this configuration on a per-application basis by putting a jaws.xml
  +file in the META-INF directory of your application.  Upon deploying
  +your beans, JAWS will first process the standardjaws.xml file, and
  +then the jaws.xml file for your application if provided.Please note
  +that if your are bundling your jar archive into an ear archive for
  +deployment the jaws.xml file still must be put into the META-INF
  +directory of the jar archive.
  +
   
Here is what you can do with standardjaws.xml / jaws.xml: 
  
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-04-25 Thread alborini

  User: alborini
  Date: 01/04/25 05:38:23

  Modified:src/docs customizingjaws.xml
  Log:
  - some corrections
  - now includes the 2 missing howtos by Michel de Groot about custom finders and join 
queries
  
  Revision  ChangesPath
  1.6   +190 -68   manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- customizingjaws.xml   2001/03/30 02:30:43 1.5
  +++ customizingjaws.xml   2001/04/25 12:38:23 1.6
  @@ -9,10 +9,11 @@


Introduction
  - JAWS is the O/R mapper used by JBoss to manage CMP entity beans. 
JAWS 
  -can be configured by putting a jaws.xml file in the
  -META-INF directory of your application. JAWS will read this file while 
  -deploying your beans. Here is what you can do with jaws.xml:   
  + JAWS is the O/R mapper used by JBoss to manage CMP entity beans. 
JAWS is configured in a file named standardjaws.xml, located in the conf/config-name 
directory in the JBoss distribution. The default config-name is 
default.
  +
  + This file configures JAWS for all JBoss. You can then extend 
this configuration on a per-application basis by putting a jaws.xml file in the 
META-INF directory of your application. Upon deploying your beans, JAWS will first 
process the standardjaws.xml file, and then the jaws.xml file for your application if 
provided.
  +
  + Here is what you can do with standardjaws.xml / jaws.xml: 
  
   

   Specify a datasource and the 
type-mappings to use with it
  @@ -107,9 +108,9 @@
If none of the predefined type mappings satisfies your needs, 
you can define 
   your own type-mapping.

  - 
  + 
JAWS Options
  - Here are the options you can set in JAWS:   
  + Here are the options you can set in JAWS. Default values are 
provided in the standardjaws.xml file:   
   

   create-table: this tells JAWS whether it 
has to try and create the 
  @@ -127,7 +128,7 @@
  
   

  -tuned-updates: when this option is turned 
on (default) JAWS will only 
  +tuned-updates: when this option is turned 
on (off by default) JAWS will only 
   update in the database the fields of your bean that have
  actually changed.
  
  @@ -141,7 +142,7 @@

   time-out: this option is only used when 
read-only is true. In this 
   case, JAWS will not refresh the state of your beans from the
  -   database more than once every time-out milliseconds.
  +   database more than once every time-out milliseconds.
  


  @@ -153,29 +154,25 @@
  


  -debug: when this option is turned on, 
JAWS will log all SQL
  +debug: when this option is turned on (off 
by default), JAWS will log all SQL
   queries at the debug level. This is useful when debugging CMP configuration and 
   database performance problems.
  


  - Each of these options can be set either generally (it will 
affect JAWS for 
  -your whole application) or on a per bean basis, or both of these.
  -JAWS will always read the defaults first, then override them with the 
  -bean-specific configuration.
  - General settings: to set an option generally, you have to 
declare it in a 

  - Example 1: you create an entity bean that will represent a 
customer. You 
  + 
  + Example 1
  + You create an entity bean that will represent a 
customer. You 
   already have the table in your database, it was created using the
   following SQL statement:
  - CREATE TABLE CUSTOMER (NAME VARCHAR(20),
  -  ADDRESS VARCHAR(100), PHONE VARCHAR(20));
  - This is how the your xml file will look like:
  - 
  - Example 2: your bank account bean has a String field to hold the 
VISA card 
  + 
  +
  + 
  + Example 2
  + Your bank account bean has a String field to hold the 
VISA card 
   number. You don't want to use the default mapping for a String
   (VARCHAR(256)) since a VISA Card number is not that long. Your xml file will 
   look like this:
  -   

[JBoss-dev] CVS update: manual/src/docs customizingjaws.xml

2001-03-28 Thread danch

  User: danch   
  Date: 01/03/28 20:47:52

  Modified:src/docs customizingjaws.xml
  Log:
  Added doco on new select-for-update and debug tags for JAWS
  
  Revision  ChangesPath
  1.4   +16 -2 manual/src/docs/customizingjaws.xml
  
  Index: customizingjaws.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/customizingjaws.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- customizingjaws.xml   2001/03/27 16:24:42 1.3
  +++ customizingjaws.xml   2001/03/29 04:47:52 1.4
  @@ -137,13 +137,27 @@
   the state of your beans. Default is false. If true, JAWS will
  perform no INSERT/UPDATE.
  
  -
  +   

   time-out: this option is only used when 
read-only is true. In this 
   case, JAWS will not refresh the state of your beans from the
  database more than once every time-out milliseconds.
  
  -
  + 
  + 
  +select-for-update: when this option is 
turned on, JAWS will do a 
  +SQL "SELECT ... FOR UPDATE" when an entity bean is loaded creating a row lock in 
the 
  +datastore.  This is very useful for synchronizing multiple instances of JBoss 
running 
  +against the same datastore.  The default value for select-for-update is false and 
  +also false when the bean is read-only.
  +   
  + 
  + 
  +debug: when this option is turned on, 
JAWS will log all SQL
  +queries at the debug level. This is useful when debugging CMP configuration and 
  +database performance problems.
  +   
  + 

Each of these options can be set either generally (it will 
affect JAWS for 
   your whole application) or on a per bean basis, or both of these.
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development