You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Miguel <mi...@juntadeandalucia.es> on 2013/02/07 13:20:52 UTC

how-to configure mysql pool connection on Solr Server

Hi

  I need configure a mysql pool connection on Solr Server for using on 
custom plugin. I saw DataImportHandler wiki: 
http://wiki.apache.org/solr/DataImportHandler , but it's seems that 
DataImportHandler open the  connection when handler is calling and close 
when finish import and I need keep opening pool to reuse connections 
whenever I need them.

I not found on documentation of Apache Solr how-to define a pools 
connection to DB for reusing them on whatever class of solr.
Any ideas?

thanks


Re: how-to configure mysql pool connection on Solr Server

Posted by Miguel <mi...@juntadeandalucia.es>.
Thanks for help

     It's a good idea configure datasource pool on Jetty or Tomcat and 
after reuse on my custom plugin.
In this page of Jetty: 
http://docs.codehaus.org/display/JETTY/DataSource+Examples
explain how-to configure differents datasources.

thanks again.

El 07/02/2013 17:35, Michael Della Bitta escribió:
> Hello Miguel,
>
> If you set up a JNDI datasource in your servlet container, you can use
> that as your database config. Then you just need to use a pooling
> datasource:
>
> http://wiki.apache.org/solr/DataImportHandlerFaq#How_do_I_use_a_JNDI_DataSource.3F
> http://dev.mysql.com/tech-resources/articles/connection_pooling_with_connectorj.html
>
>
> Michael Della Bitta
>
> ------------------------------------------------
> Appinions
> 18 East 41st Street, 2nd Floor
> New York, NY 10017-6271
>
> www.appinions.com
>
> Where Influence Isn’t a Game
>
>
> On Thu, Feb 7, 2013 at 7:20 AM, Miguel
> <mi...@juntadeandalucia.es> wrote:
>> Hi
>>
>>   I need configure a mysql pool connection on Solr Server for using on custom
>> plugin. I saw DataImportHandler wiki:
>> http://wiki.apache.org/solr/DataImportHandler , but it's seems that
>> DataImportHandler open the  connection when handler is calling and close
>> when finish import and I need keep opening pool to reuse connections
>> whenever I need them.
>>
>> I not found on documentation of Apache Solr how-to define a pools connection
>> to DB for reusing them on whatever class of solr.
>> Any ideas?
>>
>> thanks
>>


Re: how-to configure mysql pool connection on Solr Server

Posted by Michael Della Bitta <mi...@appinions.com>.
Hello Miguel,

If you set up a JNDI datasource in your servlet container, you can use
that as your database config. Then you just need to use a pooling
datasource:

http://wiki.apache.org/solr/DataImportHandlerFaq#How_do_I_use_a_JNDI_DataSource.3F
http://dev.mysql.com/tech-resources/articles/connection_pooling_with_connectorj.html


Michael Della Bitta

------------------------------------------------
Appinions
18 East 41st Street, 2nd Floor
New York, NY 10017-6271

www.appinions.com

Where Influence Isn’t a Game


On Thu, Feb 7, 2013 at 7:20 AM, Miguel
<mi...@juntadeandalucia.es> wrote:
> Hi
>
>  I need configure a mysql pool connection on Solr Server for using on custom
> plugin. I saw DataImportHandler wiki:
> http://wiki.apache.org/solr/DataImportHandler , but it's seems that
> DataImportHandler open the  connection when handler is calling and close
> when finish import and I need keep opening pool to reuse connections
> whenever I need them.
>
> I not found on documentation of Apache Solr how-to define a pools connection
> to DB for reusing them on whatever class of solr.
> Any ideas?
>
> thanks
>

Re: how-to configure mysql pool connection on Solr Server

Posted by el...@elyograg.org.
> Hi
>
>   I need configure a mysql pool connection on Solr Server for using on
> custom plugin. I saw DataImportHandler wiki:
> http://wiki.apache.org/solr/DataImportHandler , but it's seems that
> DataImportHandler open the  connection when handler is calling and close
> when finish import and I need keep opening pool to reuse connections
> whenever I need them.'
>
> I not found on documentation of Apache Solr how-to define a pools
> connection to DB for reusing them on whatever class of solr.

The dataimport handler is a module in the contrib directory. It is not
part of the core of Solr ...  From version 3.1.0, you have to add a jar to
make it work plus A jar for your jdbc driver.

There is no other database functionality in Solr. Your plugin will have to
manage its database connections.  There might be connection pooling
available from the servlet container that Solr runs in, such as tomcat,
jetty, glassfish, etc. I don't know a lot about that.

Thanks,
Shawn