here is my OJB.properties file:

# OJB.properties -- configuration of the OJB runtime environment
# (c) 2001, 2002, Apache Software Foundation
# Author: Thomas Mahler
#
#----------------------------------------------------------------------------------------
# Default repository file
#----------------------------------------------------------------------------------------
repositoryFile=repository.xml
useSerializedRepository=false
#----------------------------------------------------------------------------------------
# OJB C/S mode
#----------------------------------------------------------------------------------------
useServer=false
BrokerServers=localhost\:2001
ServerThreadCount=10
BrokerPoolSize=10
#----------------------------------------------------------------------------------------
# PersistenceBrokerFactory / PersistenceBroker
#----------------------------------------------------------------------------------------
PersistenceBrokerFactoryClass=org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl
PersistenceBrokerClass=org.apache.ojb.broker.singlevm.PersistenceBrokerImpl
#----------------------------------------------------------------------------------------
# PersistenceBrokerFactory pool
#----------------------------------------------------------------------------------------
maxActive=100
maxIdle=-1
maxWait=2000
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=1000000
whenExhaustedAction=0
#----------------------------------------------------------------------------------------
# ConnectionFactory / Default ConnectionPool
#----------------------------------------------------------------------------------------
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryConPooledImpl
maxConnectionsInPool=21
useAutoCommit=1
ignoreAutoCommitExceptions=false
#----------------------------------------------------------------------------------------
# SequenceManager
#----------------------------------------------------------------------------------------
SequenceManagerClass=org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl
SequenceManagerGrabSize=10
SequenceManagerGlobalIDs=false
#----------------------------------------------------------------------------------------
# Object cache
#----------------------------------------------------------------------------------------
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
#----------------------------------------------------------------------------------------
# Locking
#----------------------------------------------------------------------------------------
LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
LockTimeout=60000
LockAssociations=WRITE
#----------------------------------------------------------------------------------------
# Logging
#----------------------------------------------------------------------------------------
LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
LoggerConfigFile=log4j.properties
DEFAULT.LogLevel=WARN
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.LogLevel=WARN
org.apache.ojb.broker.PersistenceBrokerFactory.LogLevel=WARN
org.apache.ojb.broker.server.PersistenceBrokerClient.LogLevel=WARN
org.apache.ojb.broker.server.RequestProcessor.LogLevel=WARN
org.apache.ojb.broker.server.BrokerPool.LogLevel=WARN
org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
org.apache.ojb.broker.accesslayer.JdbcAccess.LogLevel=WARN
org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
org.apache.ojb.broker.accesslayer.StatementsForClass.LogLevel=WARN
org.apache.ojb.broker.accesslayer.SqlGenerator.LogLevel=WARN
ODMG.LogLevel=WARN
performance.LogLevel=INFO
soda.LogLevel=WARN
#----------------------------------------------------------------------------------------
# OQL / SQL settings
#----------------------------------------------------------------------------------------
OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl
PrefetchInLimit=200
#----------------------------------------------------------------------------------------
# Meta data / mapping settings
#----------------------------------------------------------------------------------------
PersistentFieldClass=org.apache.ojb.broker.metadata.PersistentFieldPropertyImpl
#----------------------------------------------------------------------------------------
# End of OJB.properties file
#----------------------------------------------------------------------------------------


I have had a look in my SQL Server (v. 2000) Profiler and I have discovered that the 
connection is OK and the database executes a storage procedure like:

declare @P1 int
set @P1=180150000
declare @P2 int
set @P2=4
declare @P3 int
set @P3=1
declare @P4 int
set @P4=-1
exec sp_cursoropen @P1 output, N'SELECT 
A0.APPL_COMMENT,A0.APPL_USAGE_FLAG_FRENCH,A0.APPL_FULL_NAME,A0.APPL_VERSION,A0.APPL_ID,A0.APPL_DHCP
 FROM APPLICATIONS A0', @P2 output, @P3 output, @P4 output
select @P1, @P2, @P3, @P4

I have tested the SQL query (select) and it's OK. But I don't know why the program 
creates a cursor!?

Have you seen, in my repository.xml file, the dbalias entry? Do you know what is the 
SelectMethod??



Thank you
Sylvain








-----Message d'origine-----
De: Charles Anthony [mailto:[EMAIL PROTECTED]]
Date: lundi, 9. septembre 2002 16:27
�: 'OJB Users List'
Objet: RE: OJB first test problem


>1. here is the entire output in my output console:
[snip output]
>
>after that, the program still run but nothing append. I have 
>to stop it manually.

I see; that's quite important ! I'm guessing the connection pool is
exhausted. Can you post the contents of your OJB.properties file ?

>2. where can I find this logging in OJB?

in the file "C:/documents/download/eclipse/eclipse-SDK-2.0-win32/works
pace/WocConfigDB400/OJB.properties" ! Look at the default ojb.properties in
the source tree for full documentation for all the options.

>3. yes, it's a just a typo in my email.
>
>
>Thank you very much
>Sylvain
>
>-----Message d'origine-----
>De: Charles Anthony [mailto:[EMAIL PROTECTED]]
>Date: lundi, 9. septembre 2002 15:56
>�: 'OJB Users List'
>Objet: RE: OJB first test problem
>
>
>OK;
>
>1. Can you post the entire output (as opposed to just the log messages)
>2. Have you traced the generated SQL ? You can use either the 
>logging in
>OJB, or use the SQLServer Profiler - check that the SELECT statement is
>being sent to the SQL server, and that it is pointing at the 
>right database.
>(You wouldn't believe the number of times colleagues have said "I'm not
>getting any data", and then find the already-inserted data is in the
>'master' database, not in the queried database). 
>3. I also note that you say 
>'I have a MS SQL Server database which has an Application table '
>whereas your repository.xml declares an "APPLICATIONS" table 
>i.e. the names
>are different, the latter being plural. I'm sure it's just a 
>typo in the
>email, but I'd check to make sure.
>
>HTH,
>
>Charles.
>
>
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>Sent: 09 September 2002 14:47
>>To: [EMAIL PROTECTED]
>>Subject: RE: OJB first test problem
>>
>>
>>Sorry Charles!
>>
>>
>>Here is my code:
>>
>>public class OjbTestApplication {
>>      private PersistenceBroker broker;
>>
>>      /**
>>       * Constructor for OjbTestApplication.
>>       */
>>      public OjbTestApplication() {
>>
>>              /**
>>               * Persistence Broker
>>               */
>>              broker = null;
>>              try {
>>                      
>>broker=PersistenceBrokerFactory.createPersistenceBroker("reposi
>>tory.xml");
>>              } catch (Throwable t) {
>>                      t.printStackTrace();
>>              }
>>      }
>>
>>      public void getAllApplications() {
>>              System.out.println("The list of all Applications:");
>>
>>              Query query = new 
>>QueryByCriteria(Application.class, null);
>>              try {
>>                      Collection allApplications 
>>=broker.getCollectionByQuery(query);
>>                      java.util.Iterator iter = 
>>allApplications.iterator();
>>                      while (iter.hasNext());
>>                      {
>>                              System.out.println(iter.next());
>>                      }
>>              } catch (Throwable t) {
>>                      t.printStackTrace();
>>              }
>>      }
>>
>>
>>      public static void main(String args[]) {
>>              System.out.println("OJB first test:");
>>
>>              OjbTestApplication test = new OjbTestApplication();
>>
>>              test.getAllApplications();
>>      }
>>}
>>
>>
>>I have a MS SQL Server database which has an Application table 
>>(which is full of data).
>>I have runned the setup script to create OJB internal tables 
>>and some conf. files and it's OK.
>>
>>Here is the connection stuffs in repository.xml:
>>
>>   <jdbc-connection-descriptor
>>              platform="MsSQLServer"
>>              jdbc-level="1.0"
>>              driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
>>              protocol="jdbc"
>>              subprotocol="microsoft:sqlserver"
>>              
>>dbalias="//sfr9800:1433;DatabaseName=Config_DB;SelectMethod=cur
>>sor;User=sa;Password=Pro2001com;"
>>              username="sa"
>>              password="Pro2001com"
>>   />
>>
>>
>>Here is the repository_user.xml:
>>
>>   <class-descriptor
>>        class="wocconfigdb400.data.Application"
>>        table="APPLICATIONS"
>>   >
>>      <field-descriptor id="1"
>>         name="_id"
>>         column="APPL_ID"
>>         jdbc-type="INTEGER"
>>         primarykey="true"
>>         autoincrement="true"
>>      />
>>      <field-descriptor id="6"
>>         name="applicationName"
>>         column="APPL_FULL_NAME"
>>         jdbc-type="VARCHAR"
>>      />
>>      <field-descriptor id="7"
>>         name="applicationVersion"
>>         column="APPL_VERSION"
>>         jdbc-type="VARCHAR"
>>      />
>>      <field-descriptor id="24"
>>         name="dhcpAvailable"
>>         column="APPL_DHCP"
>>         jdbc-type="BIT"
>>      />
>>      <field-descriptor id="18"
>>         name="applicationDescription"
>>         column="APPL_COMMENT"
>>         jdbc-type="VARCHAR"
>>      />
>>      <field-descriptor id="13"
>>         name="usePrecedentVersion"
>>         column="APPL_USAGE_FLAG_FRENCH"
>>         jdbc-type="BIT"
>>      />
>>   </class-descriptor>
>>
>>
>>Thank you
>>Sylvain
>>
>>-----Message d'origine-----
>>De: Charles Anthony [mailto:[EMAIL PROTECTED]]
>>Date: lundi, 9. septembre 2002 15:36
>>�: 'OJB Users List'
>>Objet: RE: OJB first test problem
>>
>>
>>Hi Sylvain,
>>
>>We'd need a bit more information about what you were trying to do... 
>>
>>I understand you were running Tutorial 1, but I'm not sure 
>>what order you'd
>>things stuff in. Does the database have any products in it to 
>>begin with ?
>>(Do 'select * from PRODUCT' in SQL Server Query Analyzer)
>>
>>If the table is empty, you won't get any lines output.
>>
>>Cheers,
>>
>>Charles (not Anthony !)
>>
>>P.S. you've 'hidden' your password in the last email with "*", but you
>>forgot to hide it in the dbAlias. Oops ! You don't need to 
>>specify it twice;
>>I'd leave it out of the dbalias.
>>
>>
>>>-----Original Message-----
>>>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED]]
>>>Sent: 09 September 2002 14:28
>>>To: [EMAIL PROTECTED]
>>>Subject: RE: OJB first test problem
>>>
>>>
>>>Here is my connection conf:
>>>
>>><jdbc-connection-descriptor
>>>             platform="MsSQLServer"
>>>             jdbc-level="2.0"
>>>             driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
>>>             protocol="jdbc"
>>>             subprotocol="microsoft:sqlserver"
>>>             
>>>dbalias="//sfr9800:1433;DatabaseName=Config_DB;SelectMethod=cur
>>>sor;User=sa;Password=Pro2001com;"
>>>             username="sa"
>>>             password="******"
>>>   />
>>>
>>>
>>>Thank you
>>>Sylvain
>>>
>>>-----Message d'origine-----
>>>De: Th�voz Sylvain, IT-DCS-CPS-CLI-DAR 
>>>Date: lundi, 9. septembre 2002 15:24
>>>�: [EMAIL PROTECTED]
>>>Objet: RE: OJB first test problem
>>>
>>>
>>>OK, Thank you Anthony.
>>>
>>>I say that because nothing append after these lines!
>>>I have followed the example in the doc (Tutorial 1).
>>>
>>>How to chekc that all is OK and what could happen?
>>>
>>>Thank you
>>>Sylvain
>>>
>>>-----Message d'origine-----
>>>De: Charles Anthony [mailto:[EMAIL PROTECTED]]
>>>Date: lundi, 9. septembre 2002 14:54
>>>�: 'OJB Users List'
>>>Objet: RE: OJB first test problem
>>>
>>>
>>>Hi Sylvain
>>>
>>>[snip]
>>>
>>>>[BOOT] INFO: OJB.properties:
>>>>[org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] 
>>>>INFO: Already created persistence broker instances: 0
>>>>[org.apache.ojb.broker.util.sequence.SequenceManagerFactory] 
>>>>INFO: Use sequence manager class: class 
>>>>org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl
>>>>
>>>>[org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFa
>>>>ctory] INFO: # Create connection pool for JdbcDescriptorKey 
>>>>1328753910 #
>>>>[org.apache.ojb.broker.accesslayer.AbstractConnectionFactory] 
>>>>INFO: # Already created connections: 1 returning : 
>>>>com.microsoft.jdbc.sqlserver.SQLServerConnection@280a69
>>>
>>>
>>>All those log messages are fine; they do not indicate errors. You can
>>>configure the logger not to show INFO messages, if you like (see
>>>ojb.properties documentation)
>>>
>>>Cheers,
>>>
>>>Charles.
>>>
>>>
>>>This email and any attachments are strictly confidential and 
>>>are intended
>>>solely for the addressee. If you are not the intended 
>>>recipient you must
>>>not disclose, forward, copy or take any action in reliance on 
>>>this message
>>>or its attachments. If you have received this email in error 
>>>please notify
>>>the sender as soon as possible and delete it from your 
>>>computer systems.
>>>Any views or opinions presented are solely those of the author 
>>>and do not
>>>necessarily reflect those of HPD Software Limited or its affiliates.
>>>
>>> At present the integrity of email across the internet cannot 
>>>be guaranteed
>>>and messages sent via this medium are potentially at risk.  
>>>All liability
>>>is excluded to the extent permitted by law for any claims 
>>>arising as a re-
>>>sult of the use of this medium to transmit information by or to 
>>>HPD Software Limited or its affiliates.
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>>
>>--
>>To unsubscribe, 
>>e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>>
>>--
>>To unsubscribe, 
>>e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>>
>>This email and any 
>>attachments are strictly confidential and are intended
>>solely for the addressee. If you are not the intended 
>>recipient you must
>>not disclose, forward, copy or take any action in reliance on 
>>this message
>>or its attachments. If you have received this email in error 
>>please notify
>>the sender as soon as possible and delete it from your 
>>computer systems.
>>Any views or opinions presented are solely those of the author 
>>and do not
>>necessarily reflect those of HPD Software Limited or its affiliates.
>>
>> At present the integrity of email across the internet cannot 
>>be guaranteed
>>and messages sent via this medium are potentially at risk.  
>>All liability
>>is excluded to the extent permitted by law for any claims 
>>arising as a re-
>>sult of the use of this medium to transmit information by or to 
>>HPD Software Limited or its affiliates.
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For 
>>additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For 
>>additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>>
>
>
>This email and any attachments are strictly confidential and 
>are intended
>solely for the addressee. If you are not the intended 
>recipient you must
>not disclose, forward, copy or take any action in reliance on 
>this message
>or its attachments. If you have received this email in error 
>please notify
>the sender as soon as possible and delete it from your 
>computer systems.
>Any views or opinions presented are solely those of the author 
>and do not
>necessarily reflect those of HPD Software Limited or its affiliates.
>
> At present the integrity of email across the internet cannot 
>be guaranteed
>and messages sent via this medium are potentially at risk.  
>All liability
>is excluded to the extent permitted by law for any claims 
>arising as a re-
>sult of the use of this medium to transmit information by or to 
>HPD Software Limited or its affiliates.
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For 
>additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For 
>additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


This email and any attachments are strictly confidential and are intended
solely for the addressee. If you are not the intended recipient you must
not disclose, forward, copy or take any action in reliance on this message
or its attachments. If you have received this email in error please notify
the sender as soon as possible and delete it from your computer systems.
Any views or opinions presented are solely those of the author and do not
necessarily reflect those of HPD Software Limited or its affiliates.

 At present the integrity of email across the internet cannot be guaranteed
and messages sent via this medium are potentially at risk.  All liability
is excluded to the extent permitted by law for any claims arising as a re-
sult of the use of this medium to transmit information by or to 
HPD Software Limited or its affiliates.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to