• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat + JNDI + MySQL Configurations

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[EDIT]
This post was edited during the day. So, what was a doubt in the beginning, went resolved in the end. Finally, it's not more a question, but maybe be usefull for future reference... in the case of JNDI or POOL searches, for example!
[/EDIT]

Hi Guys!!!

I'm using JForum 2.1.7 (CVS version), which is hosted at LocaWeb (located at Brazil).

Well... some technicals burocracies were supressed, but there is some great fail between the Tomcat test server and MySQL server (yes, they separeted the servers).

Below is a selected part of stack trace sequence:



Talking with LocaWeb support, they suggested me to use a JNDI conexxion pool! There isn't so much about it at JForum.net's forums... :-(

We know that the file /WEB-INF/config/jforum-custom.conf has the line below:

database.connection.string=jdbc\:mysql\://${database.connection.host}\:${database .connection.port}/${database.connection.dbname}?user\=${database.connection.username} &password\=${database.connection.password}&autoReconnect\=true${mysql.unicode }${mysql.encoding}&useNewIO\=false&zeroDateTimeBehavior\=convertToNull&us eServerPrepStmts\=false

So, the helpdesk guy send me a jsp file with the following source code:



I really don't have any idea about how to merge the default database connexion with this JNDI, which is already configured, but I don't know how to use :~-(

At Installation & Configuration - Wizard there are the 2 following informations:

Connection type <--> Which method to use to connect to database. Native will use regular connections, while DataSource will try to connect using the specified datasource name

DataSource name <--> If you chosen DataSource as Connection Type, then inform the name of the datasource

So, at file \WEB-INF\config\SystemGlobals.properties we have the following lines about database configurations:



I imagine that to use JNDI is necessary to change the following lines from the file /WEB-INF/config/jforum-custom.conf:



[ ]'s

PS: An expert guy told me that the connexion fails happened because at shared enviroments, like is my case, the C3PO connexion pool doesn't work very well! So, he suggested me to use JNDI!
[originally posted on jforum.net by leandro_salvador]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Leandro,

I have the same problem with LocaWeb. Did you solve this question? How?
Thanks.
[originally posted on jforum.net by glauco.todesco]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't recommend using JNDI at locaweb. Use net.jforum.SimpleConneciton instead. Also, don't try any soft of connection pools there.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The net.jforum.SimpleConneciton works at LocaWeb. Now the forum is OK.
Thanks.

Glauco

[originally posted on jforum.net by glauco.todesco]
 
You can't expect to wield supreme executive power just because
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic