RE: [dbcp] new user questions

2015-09-03 Thread Pruitt, Byron S
Thanks.

-Original Message-
From: Phil Steitz [mailto:phil.ste...@gmail.com] 
Sent: Thursday, September 03, 2015 1:26 PM
To: Commons Users List
Subject: Re: [dbcp] new user questions





> On Sep 3, 2015, at 9:22 AM, Pruitt, Byron S  wrote:
> 
> I am new to the DBCP framework and I have some newbie questions.
> 
> I have the PoolingDataSourceExample working with my driver and I get 
> connections from my DataSource.
> 
> What I am unclear on is how I return a connection back to the pool.
> After I have finished with executing a statement and finished with the 
> ResultSet or having issued a commit if that is needed, then what?
> Do I do nothing with the connection?  How is the connection returned to pool, 
> so it can be reused?

Just call close() on the connection.  That will cause the physical connection 
to be returned to the pool.
> 
> 
> Also, it looks like the way to configure the pool for the number of 
> connections, etc. is via GenericObjectPoolConfig passed to the 
> GenericObjectPool instance.
> 
> 
Correct.  If you don't want to separately create and configure the object pool, 
have a look at BasicDatasource, which exposes the pool configure parameters 
directly.

Phil
> 
> Thanks ahead for any answers.
> 
> 
> Steve Pruitt
> 

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



[dbcp] setting connection defaults

2015-09-03 Thread Pruitt, Byron S
What is the best to set properties like auto commit.  The DataSource interface 
doesn't expose anything.  The only thing I can find that supports these 
properties is BasicDataSource.

Thanks in advance.


Steve Pruitt

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [dbcp] new user questions

2015-09-03 Thread Phil Steitz




> On Sep 3, 2015, at 9:22 AM, Pruitt, Byron S  wrote:
> 
> I am new to the DBCP framework and I have some newbie questions.
> 
> I have the PoolingDataSourceExample working with my driver and I get 
> connections from my DataSource.
> 
> What I am unclear on is how I return a connection back to the pool.
> After I have finished with executing a statement and finished with the 
> ResultSet or having issued a commit if that is needed, then what?
> Do I do nothing with the connection?  How is the connection returned to pool, 
> so it can be reused?

Just call close() on the connection.  That will cause the physical connection 
to be returned to the pool.
> 
> 
> Also, it looks like the way to configure the pool for the number of 
> connections, etc. is via GenericObjectPoolConfig passed to the 
> GenericObjectPool instance.
> 
> 
Correct.  If you don't want to separately create and configure the object pool, 
have a look at BasicDatasource, which exposes the pool configure parameters 
directly.

Phil
> 
> Thanks ahead for any answers.
> 
> 
> Steve Pruitt
> 

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [dbutils] Statement Configuration, 1.7 release?

2015-09-03 Thread Gary Gregory
Any Apache committers willing to RM?

Gary

On Mon, Aug 31, 2015 at 9:57 AM, John Huffaker 
wrote:

> Hi All,
>
> I was curious if you were considering doing a 1.7 release anytime soon?  A
> patchset that allows us to set query timeouts on underlying statements was
> added (http://svn.apache.org/viewvc?view=revision=1673781) and
> became more important for us when we moved from BoneCP (which sets it
> automatically) to hikari (which doesn't set it).
>
> Any other suggestions would be helpful.  I could use a snapshot build, but
> I'd prefer to use a maven published non-changing build.  I know I can rig
> this up, but I was curious if a new release was coming anyway, and I can
> wait.
>
> <3,
> John Huffaker
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


[dbcp] new user questions

2015-09-03 Thread Pruitt, Byron S
I am new to the DBCP framework and I have some newbie questions.

I have the PoolingDataSourceExample working with my driver and I get 
connections from my DataSource.

What I am unclear on is how I return a connection back to the pool.
After I have finished with executing a statement and finished with the 
ResultSet or having issued a commit if that is needed, then what?
Do I do nothing with the connection?  How is the connection returned to pool, 
so it can be reused?


Also, it looks like the way to configure the pool for the number of 
connections, etc. is via GenericObjectPoolConfig passed to the 
GenericObjectPool instance.



Thanks ahead for any answers.


Steve Pruitt



Re: [SCXML] Timers in SCXML

2015-09-03 Thread giangttpham
I know this topic has been solved a long time ago but if anyone out there is
listening, please help me. This is the scxml I have but the Timer delay
doesn't work. I have the same problem as the person who started this post,
after the send, the program just stops, it never goes to the next state.

http://www.w3.org/2005/07/scxml;
  version="1.0"
  initial="player">






 
  
   
  
 

































--
View this message in context: 
http://apache-commons.680414.n4.nabble.com/SCXML-Timers-in-SCXML-tp746934p4678456.html
Sent from the Commons - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [dbcp] setting connection defaults

2015-09-03 Thread Phil Steitz
On 9/3/15 12:26 PM, Pruitt, Byron S wrote:
> What is the best to set properties like auto commit.  The DataSource 
> interface doesn't expose anything.  The only thing I can find that supports 
> these properties is BasicDataSource.

This depends on your application, but it's good to start with the
defaults, which as of DBCP 2.x are the defaults set by the database
driver.  You can change the default connection properties by
specifying them in the BasicDataSource config or by setting them on
the PoolableConnectionFactory if you are manually creating the
PoolingDataSource.

Phil
>
> Thanks in advance.
>
>
> Steve Pruitt
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org