On Mon, Nov 8, 2010 at 9:29 PM, Karl Eigengrund
<[email protected]> wrote:
> I am new to Mahout. I am using it to get recommendations out of my data 
> stored in a MySQL database. I have started by configuring the DataSource 
> programmatically, and followed the performace hints in the JavaDoc for 
> MySQLJDBCDataModel. But without connection pooling the performance is with 
> just 3000 preferences extremely bad.

I think we exchanged a message before -- the issue was perhaps you
were not using connection pools or indexes?


> I am using Tomcat and  I have done the configuration as described here: 
> http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-j2ee.html,
> under 20.3.5.2.2. Using Connector/J with Tomcat

Looks right.

> The usual way for retrieving the DataSource via JNDI doesn’t work for me, 
> since Mahout requires a MySQLJDBCDataModel. The following cast doesn’t work:
>
> InitialContext ctx = new InitialContext();
> dataSource = (MysqlDataSource)ctx.lookup(
> “java:comp/env/jdbc/MySQLDB");
>

It does not require MysqlDataSource; not sure what you mean. It does
not for the reason you find. Just remove the cast.

Reply via email to