[JBoss-dev] Jboss2.4.4 scheduler

2002-05-20 Thread kv

Hi team,
I'm not quite sure if this is the right place for reporting this sort of thing, but 
here it is:
The class org.jboos.util.Scheduler has the following invocation of the Timer mbean 
addNotification method while there is no such method with that signature:
This call is made when the value of the schedule start date is more than 'time-now'.
line 290: // Add an initial call
mActualSchedule = ( (Integer) getServer().invoke(
   mTimer,
   addNotification,
   new Object[]
   {
  Schedule,
  Scheduler Notification,
  mStartDate,
   },
   new String[]
   {
  String.class.getName(),
  String.class.getName(),
  Date.class.getName(),
   }
   ) ).intValue();
}
Changing the above to the following fixed the problem.
 // Add an initial call
mActualSchedule = ( (Integer) getServer().invoke(
   mTimer,
   addNotification,
   new Object[]
   {
  Schedule,
  Scheduler Notification,
  null,
  mStartDate,
  new Long( mActualSchedulePeriod )
   },
   new String[]
   {
  String.class.getName(),
  String.class.getName(),
  Object.class.getName(),
  Date.class.getName(),
  Long.TYPE.getName()
   }
   ) ).intValue();
}
Thanks for jboss,
and remember we love you.
* * *

View thread online: http://jboss.org/forums/thread.jsp?forum=66thread=15979

___
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/metadata JawsEntityMetaData.java

2001-07-11 Thread KV Vinay Menon

  User: kvvinaymenon
  Date: 01/07/11 08:03:26

  Modified:src/main/org/jboss/ejb/plugins/jaws/metadata Tag: Branch_2_4
JawsEntityMetaData.java
  Log:
  Modified for support for stable row id based updates in databases like Oracle. The 
jaws.xml file needs to include a stable-rowid-column field for the entity and its 
value
  should correspond to the name of the stable row id column e.g. rowid in Oracle.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.9.4.2   +214 -206  
jboss/src/main/org/jboss/ejb/plugins/jaws/metadata/JawsEntityMetaData.java
  
  Index: JawsEntityMetaData.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/metadata/JawsEntityMetaData.java,v
  retrieving revision 1.9.4.1
  retrieving revision 1.9.4.2
  diff -u -r1.9.4.1 -r1.9.4.2
  --- JawsEntityMetaData.java   2001/07/03 16:40:13 1.9.4.1
  +++ JawsEntityMetaData.java   2001/07/11 15:03:26 1.9.4.2
  @@ -36,58 +36,61 @@
*   @author a href=[EMAIL PROTECTED]Sebastien Alborini/a
*  @author a href=mailto:[EMAIL PROTECTED];Dirk Zimmermann/a
*  @author a href=mailto:[EMAIL PROTECTED];Vinay Menon/a
  - *   @version $Revision: 1.9.4.1 $
  + *   @version $Revision: 1.9.4.2 $
*/
   public class JawsEntityMetaData extends MetaData implements XmlLoadable {
  - // Constants -
  +   // Constants -
   
  - // Attributes 
  +   // Attributes 
   
  - // parent metadata structures
  - private JawsApplicationMetaData jawsApplication;
  - private EntityMetaData entity;
  +   // parent metadata structures
  +   private JawsApplicationMetaData jawsApplication;
  +   private EntityMetaData entity;
   
  - // the name of the bean (same as entity.getEjbName())
  - private String ejbName = null;
  +   // the name of the bean (same as entity.getEjbName())
  +   private String ejbName = null;
   
  - // the name of the table to use for this bean
  - private String tableName = null;
  +   // the name of the table to use for this bean
  +   private String tableName = null;
   
  - // do we have to try and create the table on deployment?
  - private boolean createTable;
  +   // do we have to try and create the table on deployment?
  +   private boolean createTable;
   
  - // do we have to drop the table on undeployment?
  - private boolean removeTable;
  +   // do we have to drop the table on undeployment?
  +   private boolean removeTable;
   
  - // do we use tuned updates?
  - private boolean tunedUpdates;
  +   // do we use tuned updates?
  +   private boolean tunedUpdates;
   
  +   //Enable fast updates based on stable row id column
  +   private String stableRowIdColumn;
  +
  // do we use 'SELECT ... FOR UPDATE' syntax?
  private boolean selectForUpdate;
   
  - // is the bean read-only?
  - private boolean readOnly;
  - private int timeOut;
  +   // is the bean read-only?
  +   private boolean readOnly;
  +   private int timeOut;
   
  - // should the table have a primary key constraint?
  - private boolean pkConstraint;
  +   // should the table have a primary key constraint?
  +   private boolean pkConstraint;
   
  - // is the bean's primary key a composite object
  - private boolean compositeKey;
  +   // is the bean's primary key a composite object
  +   private boolean compositeKey;
   
  - // the class of the primary key
  - private Class primaryKeyClass;
  +   // the class of the primary key
  +   private Class primaryKeyClass;
   
  - // the fields we must persist for this bean
  - private Hashtable cmpFields = new Hashtable();
  +   // the fields we must persist for this bean
  +   private Hashtable cmpFields = new Hashtable();
   
  - // the fields that belong to the primary key (if composite)
  - private ArrayList pkFields = new ArrayList();
  +   // the fields that belong to the primary key (if composite)
  +   private ArrayList pkFields = new ArrayList();
   
  - // finders for this bean
  - private ArrayList finders = new ArrayList();
  +   // finders for this bean
  +   private ArrayList finders = new ArrayList();
   
  - // the bean level datasource
  +   // the bean level datasource
   /**
* This will now support datasources at the bean level. If no datasource
* has been specified at the bean level then the global datasource is used
  @@ -96,104 +99,106 @@
* different datasources for different beans.
*
*/
  - private DataSource dataSource=null;
  +   private DataSource dataSource=null;
   
  - /**
  -  * Here we store the basename of all 

[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jaws_2_4.dtd

2001-07-11 Thread KV Vinay Menon

  User: kvvinaymenon
  Date: 01/07/11 08:27:01

  Modified:src/resources/org/jboss/metadata Tag: Branch_2_4
jaws_2_4.dtd
  Log:
  Support for stable row id based updates.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +14 -2 jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd
  
  Index: jaws_2_4.dtd
  ===
  RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- jaws_2_4.dtd  2001/07/03 20:50:21 1.1.2.2
  +++ jaws_2_4.dtd  2001/07/11 15:27:01 1.1.2.3
  @@ -28,7 +28,7 @@
   
   !ELEMENT debug (#PCDATA)
   
  -!ELEMENT default-entity (create-table, remove-table, tuned-updates, read-only, 
pk-constraint?, select-for-update?, time-out)
  +!ELEMENT default-entity (create-table, remove-table, 
tuned-updates,stable-rowid-column?, read-only, pk-constraint?, select-for-update?, 
time-out)
   !ELEMENT create-table (#PCDATA)
   !ELEMENT remove-table (#PCDATA)
   !ELEMENT tuned-updates (#PCDATA)
  @@ -59,7 +59,7 @@
time-out: For read-only only, re-load entity after time-out
   --
   !ELEMENT entity (ejb-name,datasource?,cmp-field*,finder*,read-ahead?,read-only?,
  -  
table-name?,tuned-updates?,create-table?,remove-table?,select-for-update?,time-out?,pk-constraint?)
  +  
table-name?,tuned-updates?,stable-rowid-column?,create-table?,remove-table?,select-for-update?,time-out?,pk-constraint?)
   
   !-- ejb-name within an entity element must contain the ejb-name as specified
in ejb-jar.xml. --
  @@ -67,6 +67,18 @@
   !-- The datasource at bean level. If specified the bean will use this datasource 
instead of the global one. 
   Else the global one is used --
   !ELEMENT datasource (#PCDATA)
  +
  +!--
  +To use rowid based updates for Oracle
  +
  +a)  In your bean class delcare a field 'rowid' of type String and declare it
  +in your ejb-jar.xml and jaws.xml as you would with other CMP fields
  +b) In your jaws.xml define an element stable-rowid-column with value = rowid
  +
  +It should default to the primary key in case the row id is null - insert-update or 
insert-delete or combinations
  +--
  +
  +!ELEMENT stable-rowid-column (#PCDATA)
   !ELEMENT cmp-field (field-name, column-name)
   !ELEMENT field-name (#PCDATA)
   !ELEMENT column-name (#PCDATA)
  
  
  

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCDefinedFinderCommand.java

2001-07-10 Thread KV Vinay Menon

  User: kvvinaymenon
  Date: 01/07/10 15:42:32

  Modified:src/main/org/jboss/ejb/plugins/jaws/jdbc
JDBCDefinedFinderCommand.java
  Log:
  Fix for checking null arguments in Finders and ensuring that the NULL sql datatype 
is assigned to such a variable. (Bugs item #440167)
  
  Revision  ChangesPath
  1.17  +25 -15
jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java
  
  Index: JDBCDefinedFinderCommand.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JDBCDefinedFinderCommand.java 2001/07/03 20:59:55 1.16
  +++ JDBCDefinedFinderCommand.java 2001/07/10 22:42:32 1.17
  @@ -29,7 +29,7 @@
* @author a href=mailto:[EMAIL PROTECTED];Vinay Menon/a
* @author a href=mailto:[EMAIL PROTECTED];danch (Dan Christopherson)/a
* @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a
  - * @version $Revision: 1.16 $
  + * @version $Revision: 1.17 $
*
* Revisions:
* 20010621 Bill Burke: exposed parameterArray through get method.
  @@ -57,20 +57,20 @@
 String query = ;
 ArrayList parameters = new ArrayList();
 if (f.getQuery() != null)  {
  -   StringTokenizer finderQuery = new StringTokenizer(f.getQuery(),{}, 
true);
  + StringTokenizer finderQuery = new StringTokenizer(f.getQuery(),{}, true);
   
  -   while (finderQuery.hasMoreTokens())
  -   {
  -  String t = finderQuery.nextToken();
  -  if (t.equals({))
  -  {
  - query += ?;
  - String idx = finderQuery.nextToken(); // Remove number
  - parameters.add(new Integer(idx));
  - finderQuery.nextToken(); // Remove }
  -  } else
  - query += t;
  -   }
  + while (finderQuery.hasMoreTokens())
  + {
  +String t = finderQuery.nextToken();
  +if (t.equals({))
  +{
  +   query += ?;
  +   String idx = finderQuery.nextToken(); // Remove number
  +   parameters.add(new Integer(idx));
  +   finderQuery.nextToken(); // Remove }
  +} else
  +   query += t;
  + }
 }
   
 // Copy index numbers to parameterArray
  @@ -255,7 +255,17 @@
 for (int i = 0; i  parameterArray.length; i++)
 {
 Object arg = args[parameterArray[i]];
  -  int jdbcType = typeMapping.getJdbcTypeForJavaType(arg.getClass());
  +  int jdbcType;
  +
  +  if(arg!=null)
  +  {
  + jdbcType = typeMapping.getJdbcTypeForJavaType(arg.getClass());
  +  }
  +  else
  +  {
  + jdbcType = java.sql.Types.NULL;
  +  }
  +
 setParameter(stmt,i+1,jdbcType,arg);
 }
  }
  
  
  

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



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCDefinedFinderCommand.java

2001-07-10 Thread KV Vinay Menon

  User: kvvinaymenon
  Date: 01/07/10 16:04:37

  Modified:src/main/org/jboss/ejb/plugins/jaws/jdbc Tag: Branch_2_4
JDBCDefinedFinderCommand.java
  Log:
  Fix for checking null arguments in Finders and ensuring that the NULL sql datatype 
is assigned to such a variable. (Bugs item #440167)
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.2  +24 -15
jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java
  
  Index: JDBCDefinedFinderCommand.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java,v
  retrieving revision 1.14.2.1
  retrieving revision 1.14.2.2
  diff -u -r1.14.2.1 -r1.14.2.2
  --- JDBCDefinedFinderCommand.java 2001/07/03 15:20:30 1.14.2.1
  +++ JDBCDefinedFinderCommand.java 2001/07/10 23:04:37 1.14.2.2
  @@ -28,7 +28,7 @@
* @author a href=mailto:[EMAIL PROTECTED];Michel de Groot/a
* @author a href=mailto:[EMAIL PROTECTED];Vinay Menon/a
* @author a href=mailto:[EMAIL PROTECTED];danch (Dan Christopherson/a
  - * @version $Revision: 1.14.2.1 $
  + * @version $Revision: 1.14.2.2 $
*/
   public class JDBCDefinedFinderCommand extends JDBCFinderCommand
   {
  @@ -53,20 +53,20 @@
 String query = ;
 ArrayList parameters = new ArrayList();
 if (f.getQuery() != null)  {
  -   StringTokenizer finderQuery = new StringTokenizer(f.getQuery(),{}, 
true);
  + StringTokenizer finderQuery = new StringTokenizer(f.getQuery(),{}, true);
   
  -   while (finderQuery.hasMoreTokens())
  -   {
  -  String t = finderQuery.nextToken();
  -  if (t.equals({))
  -  {
  - query += ?;
  - String idx = finderQuery.nextToken(); // Remove number
  - parameters.add(new Integer(idx));
  - finderQuery.nextToken(); // Remove }
  -  } else
  - query += t;
  -   }
  + while (finderQuery.hasMoreTokens())
  + {
  +String t = finderQuery.nextToken();
  +if (t.equals({))
  +{
  +   query += ?;
  +   String idx = finderQuery.nextToken(); // Remove number
  +   parameters.add(new Integer(idx));
  +   finderQuery.nextToken(); // Remove }
  +} else
  +   query += t;
  + }
 }
   
 // Copy index numbers to parameterArray
  @@ -246,7 +246,16 @@
 for (int i = 0; i  parameterArray.length; i++)
 {
 Object arg = args[parameterArray[i]];
  -  int jdbcType = typeMapping.getJdbcTypeForJavaType(arg.getClass());
  +  int jdbcType;
  +
  +  if(arg!=null)
  +  {
  + jdbcType = typeMapping.getJdbcTypeForJavaType(arg.getClass());
  +  }
  +  else
  +  {
  + jdbcType = java.sql.Types.NULL;
  +  }
 setParameter(stmt,i+1,jdbcType,arg);
 }
  }
  
  
  

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