• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to switch database system?

 
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 noticed a problem with my website. My website context and the jforum context are using the same database... but during the installation of jforum, I made a mistake. I specified a native connection information for the database instead of specified the existing datasource used by my website.

The problem now is that jforum is managing itself the connection pooling and it creates troubles with my website...

So, I would like jforum to use the datasource now, but how can I switch without having to reinstall everything? ops: ops:

EDIT***

Maybe my problem cannot come from there. The datasource is defined at the context level and the website and the forum have their own context, and also their own datasource.

Second question: if my database allows 10 connections, if I have 2 datasources configured to manage 10 connections, is it means my databases will need 20 connections? Is it mean the datasource has to manage a total of 10 for the 2 context?
[originally posted on jforum.net by Blackwings]
 
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
Not sure if you can configure JForum to use an existing DataSource, Rafael will answer that, but answering your second question... if you have 2 datasources specified with 10 connections maximum each: Yes, you are allowing 20 connections to be created against your database.

You then need to split the 10 connections between both datasources, or you need to define the datasource at the container level and use the same one for both applications.


[originally posted on jforum.net by GreenEyed]
 
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
To change to DataSource, open SystemGlobals.properties - ATTENTION: you may probably have to change jforum-custom.config as well, if you used the wizard installer - and change the key "database.connection.implementation" to "net.jforum.DataSourceConnection".

Then, set the key "database.datasource.name" to your datasource name.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
The City calls upon her steadfast protectors. Now for a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic