You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Dave Merrin <dm...@ipasystems.co.uk> on 2006/03/31 18:30:55 UTC

BindException

Hi,

I get a bind exception when I'm doing large numbers of queries very quickly.
I did some optimization which eliminated the exceptions on my machine but
now I'm getting them on a different machine which is heavily loaded.

I'm using MySql5 and Cayenne M11.

Are there any connections I should be closing between calls? All queries are
done from the same DataContext and on the same thread (only one thread for
this DataContext).

I'll try and produce some code to reproduce the problem. In the meantime can
anybody help?

Dave


Re: where to put Cayenne.xml

Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/1/06, WONDER <mm...@web.de> wrote:
> Adding the xml files to Class directory worked. Unfortunateley They must be
> directly in the src directery, I cant put them in thier own directery like
> "Model.Cayenne". Similer to EOF.

Actually, you can.  You just need to specify your own Configuration options:

For instance, I use a ServletContextListener that sets this up.   For
WO, you could probably call this from the Application constructor.

    public void contextInitialized(ServletContextEvent event)
    {
        DefaultConfiguration conf = new DefaultConfiguration();
        conf.addClassPath("com/xyz/cayenne/model");
        Configuration.initializeSharedConfiguration(conf);
    }

============================================================================
> 1: WO need NSArray for repetion something like customer.projects
> Solutions: use custom subclass.vm

Yep.

============================================================================
> 2: WO uses the NSMutableDictionary, and its very handy to use it as
> lookup.name, lookup.password, etc..
> Cayenne needs Map.
> Solution: Convert the lookup into Map:

Yep.

============================================================================
> 3: I had an existing Application and then decided to switch, I think you
> want to do the same.
> i.e. You have to change all xxx.saveChange() into xxx.commitChanges. No
> need. here is the solution :)

Yep.


> BTW: i still dont understand why and when should i say removeToManyTarget(
> relName, value,     FALSE     ); !!!

Generally, you wouldn't.   But the possibility is there if you need it.


============================================================================
> 4: Session has the DefaultEditingContext, I think everybody who uses WO, can
> not develop without using the defaultEditiongContext from the Session. so
> here is it for Cayenne :).

Actually,  you should return the default cayenne session data context instead:

        return ServletUtil.getSessionContext(session);

But I can't remember how accessible the HttpSession is under 5.2.

============================================================================
> Till now I am very happy using Cayenne. I think I will never go back to EOF.
> Cayenne is really good and has very great level comparing to Tapestry which
> still has not the parellel
> "WebObjects Builder" tool .  And the PlugIn Spindle still uses Tapestry 3.
> Cayenne has great GUI and its alomost even better than EOF GUI tool. For
> example Cayenne uses the last JDBC drivers. EOF still needs the old once.
>
> You will face minor problems, and as a WO developer you will learn Cayenne
> in about 2 or 3 days. depends of course on you WO experiences.
>
> HTH.
>
> Maybe Its good idea to have a WebSite on Cayenne WebSite for WO developers
> who want to switch. Should ask Andrus :)

See http://www.objectstyle.org/cayenne/userguide/misc.html

This page hasn't been ported over to the Cayenne wiki yet.   It'd be
great if you'd do so and also add in the helpful tips you provided
above!

Actually, most of it has been ported, so you'd just need to add more
to this page:

http://www.objectstyle.org/confluence/display/CAY/From+WebObject+to+Cayenne

Thanks.

Re: where to put Cayenne.xml

Posted by WONDER <mm...@web.de>.
Hi,

Adding the xml files to Class directory worked. Unfortunateley They must be
directly in the src directery, I cant put them in thier own directery like
"Model.Cayenne". Similer to EOF.


Sure, here are the points I faced and solved.
Its REALLY worth to try.


============================================================================
1: WO need NSArray for repetion something like customer.projects
Solutions: use custom subclass.vm

----------------------------------------------------------------------------
----------------------------------------

#if( ${classGen.isUsingPackage()} )
package ${classGen.packageName};
#end

#if( ${classGen.isUsingSuperPackage()} )
import
${classGen.superPackageName}.${classGen.superPrefix}${classGen.className};
#end
import org.objectstyle.cayenne.access.*;


public class ${classGen.className} extends
${classGen.superPrefix}${classGen.className}
{
    public ${classGen.className} ()
    {
        super();
    }
    public ${classGen.className}(DataContext ec) throws CustomException
    {
        ec.registerNewObject( this );
        this.setDefaultValues();
    }
    public void setDefaultValues( )
    {

    }
}
----------------------------------------------------------------------------
----------------------------------------
and custom superclass.vm




#if( ${classGen.isUsingPackage()} )
package ${classGen.packageName};

#end
#if( ${classGen.isContainingDeclaredListProperties()} )
import java.util.List;
import com.webobjects.foundation.NSArray;
#end
import de.mrer.base.CayenneCustomDataObject;
/** Class ${classGen.superPrefix}${classGen.className} was generated by
Cayenne.
  * It is probably a good idea to avoid changing this class manually,
  * since it may be overwritten next time code is regenerated.
  * If you need to make any customizations, please use subclass.
  */
public class ${classGen.superPrefix}${classGen.className} extends
$classGen.superClassName {

## Create property names
#foreach( $attr in ${classGen.Entity.DeclaredAttributes} )
#set( $classGen.Prop = $attr.Name )## let controller know about current
property
    public static final String ${classGen.propAsConstantName}_PROPERTY =
"${attr.Name}";
#end
#foreach( $rel in ${classGen.Entity.DeclaredRelationships} )
#set( $classGen.Prop = $rel.Name )## let controller know about current
property
    public static final String ${classGen.propAsConstantName}_PROPERTY =
"${rel.Name}";
#end

#if( $classGen.Entity.DbEntity )
#foreach( $idAttr in ${classGen.Entity.DbEntity.PrimaryKey} )
#set( $classGen.Prop = $idAttr.Name )## let controller know about current
property
    public static final String ${classGen.propAsConstantName}_PK_COLUMN =
"${idAttr.Name}";
#end
#end

## Create attribute set/get methods
#foreach( $attr in ${classGen.Entity.DeclaredAttributes} )
#set( $classGen.Prop = $attr.Name )## let controller know about current
property
#if ("true" != "${classGen.getEntity().isReadOnly()}")
    public void
set${classGen.cappedProp}($classGen.formatJavaType(${attr.Type})
$classGen.formatVariableName(${attr.Name}))
    {
        writeProperty("${attr.Name}",
$classGen.formatVariableName(${attr.Name}));
    }
#end
    public $classGen.formatJavaType(${attr.Type}) ${attr.Name}()
    {
        return
($classGen.formatJavaType(${attr.Type}))readProperty("${attr.Name}");
    }

    public $classGen.formatJavaType(${attr.Type})
get${classGen.cappedProp}()
    {
        return
($classGen.formatJavaType(${attr.Type}))readProperty("${attr.Name}");
    }
#end
##
## Create list add/remove/get methods
#foreach( $rel in ${classGen.Entity.DeclaredRelationships} )
#set( $classGen.Prop = $rel.Name )## let controller know about current
property
#if( $rel.ToMany )
#if ( ! $rel.ReadOnly )
    public void
addTo${classGen.cappedProp}($classGen.formatJavaType(${rel.TargetEntity.Clas
sName}) obj)
    {
        addToManyTarget("${rel.name}", obj, true);
    }
    public void
removeFrom${classGen.cappedProp}($classGen.formatJavaType(${rel.TargetEntity
.ClassName}) obj)
    {
        removeToManyTarget("${rel.name}", obj, true);
    }
#end
    public List ${rel.name}()
    {
        return (List)readProperty("${rel.name}");
    }

    public NSArray wo${classGen.cappedProp}()
    {
        List l = this.${rel.name}();
        return new NSArray( l.toArray() );
    }

    public List get${classGen.cappedProp}()
    {
        return (List)readProperty("${rel.name}");
    }
#else
#if ( !${classGen.getEntity().isReadOnly()} && !$rel.ReadOnly )
    public void
set${classGen.cappedProp}($classGen.formatJavaType(${rel.TargetEntity.ClassN
ame}) $classGen.formatVariableName(${rel.name}))
    {
        setToOneTarget("${rel.name}",
$classGen.formatVariableName(${rel.name}), true);
    }
#end

    public $classGen.formatJavaType(${rel.TargetEntity.ClassName})
${rel.name}()
    {
        return
($classGen.formatJavaType(${rel.TargetEntity.ClassName}))readProperty("${rel
.name}");
    }

    public $classGen.formatJavaType(${rel.TargetEntity.ClassName})
get${classGen.cappedProp}()
    {
        return
($classGen.formatJavaType(${rel.TargetEntity.ClassName}))readProperty("${rel
.name}");
    }
#end


#end
}

----------------------------------------------------------------------------
----------------------------------------
============================================================================
2: WO uses the NSMutableDictionary, and its very handy to use it as
lookup.name, lookup.password, etc..
Cayenne needs Map.
Solution: Convert the lookup into Map:



    private static Map convertDicToMap(NSMutableDictionary lookup)
    {
        Map<String, Object> params = new HashMap<String, Object>();
        if( lookup.count() < 1 )
        {
            return params;
        }
        NSArray keys = lookup.allKeys();

        for(int i = 0; i < keys.count(); i++)
        {
            String key = (String)keys.objectAtIndex( i );
            Object value = lookup.objectForKey( key );
            if( value instanceof String )
            {
                value = ((String)value).trim();
            }
            params.put( key, value );
        }
        return params;
    }

============================================================================
3: I had an existing Application and then decided to switch, I think you
want to do the same.
i.e. You have to change all xxx.saveChange() into xxx.commitChanges. No
need. here is the solution :)


    public BaseComponent saveChanges( ) throws CustomException
    {
        return this.commitChanges();
    }

prallel with addToManyTargets and AddToBothSides....




    public void addObjectToBothSidesOfRelationshipWithKey(DataObject value,
String relName)
    {
        super.addToManyTarget( relName, value, true);
    }

    public void removeObjectFromBothSidesOfRelationshipWithKey(DataObject
value, String relName)
    {
        super.removeToManyTarget( relName, value, true );
    }


BTW: i still dont understand why and when should i say removeToManyTarget(
relName, value,     FALSE     ); !!!
However.

============================================================================
4: Session has the DefaultEditingContext, I think everybody who uses WO, can
not develop without using the defaultEditiongContext from the Session. so
here is it for Cayenne :).

    public CayenneCustomSession(DataDomain domain)
    {
        super();

        this.defaultDataContext = domain.createDataContext();
    }


============================================================================
Till now I am very happy using Cayenne. I think I will never go back to EOF.
Cayenne is really good and has very great level comparing to Tapestry which
still has not the parellel
"WebObjects Builder" tool .  And the PlugIn Spindle still uses Tapestry 3.
Cayenne has great GUI and its alomost even better than EOF GUI tool. For
example Cayenne uses the last JDBC drivers. EOF still needs the old once.

You will face minor problems, and as a WO developer you will learn Cayenne
in about 2 or 3 days. depends of course on you WO experiences.

HTH.

Maybe Its good idea to have a WebSite on Cayenne WebSite for WO developers
who want to switch. Should ask Andrus :)

peaSakoe





----- Original Message ----- 
From: "Mike Kienenberger" <mk...@gmail.com>
To: <ca...@incubator.apache.org>
Sent: Friday, March 31, 2006 7:41 PM
Subject: Re: where to put Cayenne.xml


On 4/1/06, WONDER <mm...@web.de> wrote:
> I use Cayenne in WebObjects 5.2.4
>
> In Eclipse, i just add the Directery as Class Folder in the Project, and
Cayenne.xml is found.
> One the Server this does not look to work.
> Where should i put the xml files to be found?

What about adding the directory to your jar file's classes folder so
it remains on the classpath?   This is how I do it in both Eclipse and
out of eclipse.   Actually, I add the files to the source folder, and
they're automatically copied over into the classes folder.

Please keep us up-to-date on using Cayenne with WO5.2.4.   I have a
5.2.4 project I'd like to convert over to using Cayenne instead of EOF
myself!


Re: where to put Cayenne.xml

Posted by WONDER <mm...@web.de>.
I use now Cayenne in 2 Applications sucessfully. Its great, to keep away
from EOF.
Unfortunately you can not use Cayenne in Framework which hast its own
Cayenne.xml with application has also its own Cayenne.xml
"At least not yet. Andrus, talked about a solution coming in the next
release. He also gave me a solution, wich I didnt want to try it."
However, Its great. You will love it.

I had the following problems I had to change:
============================================================================
1. WO need NSArray or a Vector.  best solution you use your customed
subclass.vm



----------------------------------------------------------------------------
-------------------------------------------------------

----------------------------------------------------------------------------
-------------------------------------------------------
----------------------------------------------------------------------------
-------------------------------------------------------=====================
=======================================================
============================================================================
============================================================================
============================================================================
============================================================================
============================================================================



----- Original Message ----- 
From: "Mike Kienenberger" <mk...@gmail.com>
To: <ca...@incubator.apache.org>
Sent: Friday, March 31, 2006 7:41 PM
Subject: Re: where to put Cayenne.xml


On 4/1/06, WONDER <mm...@web.de> wrote:
> I use Cayenne in WebObjects 5.2.4
>
> In Eclipse, i just add the Directery as Class Folder in the Project, and
Cayenne.xml is found.
> One the Server this does not look to work.
> Where should i put the xml files to be found?

What about adding the directory to your jar file's classes folder so
it remains on the classpath?   This is how I do it in both Eclipse and
out of eclipse.   Actually, I add the files to the source folder, and
they're automatically copied over into the classes folder.

Please keep us up-to-date on using Cayenne with WO5.2.4.   I have a
5.2.4 project I'd like to convert over to using Cayenne instead of EOF
myself!


Re: where to put Cayenne.xml

Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/1/06, WONDER <mm...@web.de> wrote:
> I use Cayenne in WebObjects 5.2.4
>
> In Eclipse, i just add the Directery as Class Folder in the Project, and Cayenne.xml is found.
> One the Server this does not look to work.
> Where should i put the xml files to be found?

What about adding the directory to your jar file's classes folder so
it remains on the classpath?   This is how I do it in both Eclipse and
out of eclipse.   Actually, I add the files to the source folder, and
they're automatically copied over into the classes folder.

Please keep us up-to-date on using Cayenne with WO5.2.4.   I have a
5.2.4 project I'd like to convert over to using Cayenne instead of EOF
myself!

where to put Cayenne.xml

Posted by WONDER <mm...@web.de>.
Hello,
I use Cayenne in WebObjects 5.2.4

In Eclipse, i just add the Directery as Class Folder in the Project, and
Cayenne.xml is found.

One the Server this does not look to work.

Where should i put the xml files to be found?

Thanks.


RE: BindException

Posted by Dave Merrin <dm...@ipasystems.co.uk>.
I sorted this in the end by using the PoolManager rather than the
DriverDataSource. The problem was happening because the connection was being
opened and closed for every query. Each connection took a tcp socket.
Windows (or Java) wasn't cleaning up quick enough hence all the sockets were
getting used up.

Dave

> -----Original Message-----
> From: Dave Merrin [mailto:dmerrin@ipasystems.co.uk]
> Sent: 31 March 2006 18:08
> To: cayenne-user@incubator.apache.org
> Subject: RE: BindException
>
>
> Hi Mike,
>
> sorry I didn't put it in the first message. I didn't have a copy
> of it when
> I send the first message, hence the need to try and reproduce it.
>
> It's just happened again on a client site:
>
> java.net.SocketException: java.net.BindException: Address already in use:
> connect
> 	at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory
> .java:156)
> 	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
> 	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
> 	at com.mysql.jdbc.Connection.<init>(Connection.java:1474)
> 	at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
> 	at
> org.objectstyle.cayenne.conn.DriverDataSource.getConnection(Driver
> DataSource
> .java:151)
> 	at
> org.objectstyle.cayenne.conn.DriverDataSource.getConnection(Driver
> DataSource
> .java:123)
> 	at
> org.objectstyle.cayenne.access.DataNode$TransactionDataSource.getC
> onnection(
> DataNode.java:589)
> 	at
> org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:301)
> 	at
> org.objectstyle.cayenne.access.DataDomainQueryAction.runQuery(Data
> DomainQuer
> yAction.java:298)
> 	at
> org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataD
> omainQuery
> Action.java:138)
> 	at
> org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:724)
> 	at
> org.objectstyle.cayenne.access.Transaction.onQuery(Transaction.java:206)
> 	at
> org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:721)
> 	at
> org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(Obj
> ectContext
> QueryAction.java:244)
> 	at
> org.objectstyle.cayenne.access.DataContextQueryAction.execute(Data
> ContextQue
> ryAction.java:88)
> 	at
> org.objectstyle.cayenne.access.DataContext.onQuery(DataContext.java:1261)
> 	at
> org.objectstyle.cayenne.access.DataContext.performQuery(DataContex
> t.java:125
> 0)
> 	at
> ipa.printexpress.data.helpers.Session.fetchEntityCollection(Sessio
> n.java:70)
> 	at ipa.px.data.adapter.PxDataAdapter.fetch(PxDataAdapter.java:124)
> 	at
> ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:71)
> 	at
> ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:56)
> 	at
> ipa.px.data.adapter.ItemNodeAdapter.getItemByItemId(ItemNodeAdapte
> r.java:634
> )
> 	at
> ipa.px.data.provider.PxItemNodeProvider.getItemsByItemId(PxItemNod
> eProvider.
> java:262)
> 	at
> ipa.px.tracker.logimporter.actions.AbstractAction.saveItem(Abstrac
> tAction.ja
> va:311)
> 	at
> ipa.px.tracker.logimporter.actions.AbstractAction.defaultCreateIte
> mAction(Ab
> stractAction.java:139)
> 	at
> ipa.px.tracker.logimporter.actions.LogSeparationAction.doAction(Lo
> gSeparatio
> nAction.java:35)
> 	at
> ipa.px.tracker.logimporter.msgrouter.MessageRouter.run(MessageRout
> er.java:13
> 7)
> 	at
> ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runIt(Threa
> dPoolWorke
> r.java:121)
> 	at
> ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runWork(Thr
> eadPoolWor
> ker.java:103)
> 	at
> ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.access$000(
> ThreadPool
> Worker.java:21)
> 	at
> ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker$1.run(Threa
> dPoolWorke
> r.java:62)
> 	at java.lang.Thread.run(Unknown Source)
>
> > -----Original Message-----
> > From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> > Sent: 31 March 2006 17:39
> > To: cayenne-user@incubator.apache.org
> > Subject: Re: BindException
> >
> >
> > What's the stack trace look like?
> >
> > On 3/31/06, Dave Merrin <dm...@ipasystems.co.uk> wrote:
> > > Hi,
> > >
> > > I get a bind exception when I'm doing large numbers of queries
> > very quickly.
> > > I did some optimization which eliminated the exceptions on my
> > machine but
> > > now I'm getting them on a different machine which is heavily loaded.
> > >
> > > I'm using MySql5 and Cayenne M11.
> > >
> > > Are there any connections I should be closing between calls?
> > All queries are
> > > done from the same DataContext and on the same thread (only one
> > thread for
> > > this DataContext).
> > >
> > > I'll try and produce some code to reproduce the problem. In the
> > meantime can
> > > anybody help?
> > >
> > > Dave
> > >
> > >
> >
>


RE: BindException

Posted by Dave Merrin <dm...@ipasystems.co.uk>.
Hi Mike,

sorry I didn't put it in the first message. I didn't have a copy of it when
I send the first message, hence the need to try and reproduce it.

It's just happened again on a client site:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1474)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.objectstyle.cayenne.conn.DriverDataSource.getConnection(DriverDataSource
.java:151)
	at
org.objectstyle.cayenne.conn.DriverDataSource.getConnection(DriverDataSource
.java:123)
	at
org.objectstyle.cayenne.access.DataNode$TransactionDataSource.getConnection(
DataNode.java:589)
	at
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:301)
	at
org.objectstyle.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQuer
yAction.java:298)
	at
org.objectstyle.cayenne.access.DataDomainQueryAction.execute(DataDomainQuery
Action.java:138)
	at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:724)
	at org.objectstyle.cayenne.access.Transaction.onQuery(Transaction.java:206)
	at org.objectstyle.cayenne.access.DataDomain.onQuery(DataDomain.java:721)
	at
org.objectstyle.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContext
QueryAction.java:244)
	at
org.objectstyle.cayenne.access.DataContextQueryAction.execute(DataContextQue
ryAction.java:88)
	at
org.objectstyle.cayenne.access.DataContext.onQuery(DataContext.java:1261)
	at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:125
0)
	at
ipa.printexpress.data.helpers.Session.fetchEntityCollection(Session.java:70)
	at ipa.px.data.adapter.PxDataAdapter.fetch(PxDataAdapter.java:124)
	at
ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:71)
	at
ipa.px.data.adapter.ItemNodeAdapter.getItemNodes(ItemNodeAdapter.java:56)
	at
ipa.px.data.adapter.ItemNodeAdapter.getItemByItemId(ItemNodeAdapter.java:634
)
	at
ipa.px.data.provider.PxItemNodeProvider.getItemsByItemId(PxItemNodeProvider.
java:262)
	at
ipa.px.tracker.logimporter.actions.AbstractAction.saveItem(AbstractAction.ja
va:311)
	at
ipa.px.tracker.logimporter.actions.AbstractAction.defaultCreateItemAction(Ab
stractAction.java:139)
	at
ipa.px.tracker.logimporter.actions.LogSeparationAction.doAction(LogSeparatio
nAction.java:35)
	at
ipa.px.tracker.logimporter.msgrouter.MessageRouter.run(MessageRouter.java:13
7)
	at
ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runIt(ThreadPoolWorke
r.java:121)
	at
ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.runWork(ThreadPoolWor
ker.java:103)
	at
ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker.access$000(ThreadPool
Worker.java:21)
	at
ipa.px.tracker.logimporter.threadpool.ThreadPoolWorker$1.run(ThreadPoolWorke
r.java:62)
	at java.lang.Thread.run(Unknown Source)

> -----Original Message-----
> From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> Sent: 31 March 2006 17:39
> To: cayenne-user@incubator.apache.org
> Subject: Re: BindException
>
>
> What's the stack trace look like?
>
> On 3/31/06, Dave Merrin <dm...@ipasystems.co.uk> wrote:
> > Hi,
> >
> > I get a bind exception when I'm doing large numbers of queries
> very quickly.
> > I did some optimization which eliminated the exceptions on my
> machine but
> > now I'm getting them on a different machine which is heavily loaded.
> >
> > I'm using MySql5 and Cayenne M11.
> >
> > Are there any connections I should be closing between calls?
> All queries are
> > done from the same DataContext and on the same thread (only one
> thread for
> > this DataContext).
> >
> > I'll try and produce some code to reproduce the problem. In the
> meantime can
> > anybody help?
> >
> > Dave
> >
> >
>


Re: BindException

Posted by Mike Kienenberger <mk...@gmail.com>.
What's the stack trace look like?

On 3/31/06, Dave Merrin <dm...@ipasystems.co.uk> wrote:
> Hi,
>
> I get a bind exception when I'm doing large numbers of queries very quickly.
> I did some optimization which eliminated the exceptions on my machine but
> now I'm getting them on a different machine which is heavily loaded.
>
> I'm using MySql5 and Cayenne M11.
>
> Are there any connections I should be closing between calls? All queries are
> done from the same DataContext and on the same thread (only one thread for
> this DataContext).
>
> I'll try and produce some code to reproduce the problem. In the meantime can
> anybody help?
>
> Dave
>
>