• 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

Sample resin.conf file

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm pretty new to Resin, but have started using after the good reports I'd heard about it on this forum.
Does anyone have a sample resin.conf file that they could publish here?
I'd been using Tomcat previously and never tinkered with it's configuration file other than to switch that gizmo on that enables you to re-deploy servlets without stopping and re-starting the Tomcat server.
Specifically a resin.conf file that configures anything to do with database connection pooling. The Resin website is loaded with info on all the tags, but I couldn't find any production-level examples that pulled them all together.
Any help greatly appreciated
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked in the Resin distribution? Mine came with a bunch of example config files in the conf/samples directory. Even the default config file contains the following snippet:

To access this from my code, I do something like:

Has that helped?
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed, thanks Frank.
Don't know why I didn't think of looking there
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm, I'm still lost
If I use a hosting service (ok, it's LunarPages) who supports a Resin application server and MySQL database, how do I configure the config file to suit my own specific application and database?
My assumption was that the resin.conf file applies to all applications on the server? I know I'm missing something simple here, but all my perusals of the Resin and MySQL doco hasn't brought me much closer to a solution. Is their some kind of config tag I place in my own application's web.xml file to declare the jndi and database name?
Also (on the side), I downloaded the latest stable MySQL driver to use with Resin, but where does it go in Resin? I put it in my web app's lib direstory and declared the driver in the driver tag of the resin.conf file, but when I fire up the Resin server it says it can't load the driver class?
I'm feeling a bit of a loser at the moment. Please help
Thanks,
Mark.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a resin web app, you can have a resin-web.xml file located under the WEB-INF folder along with the web.xml file. Or, you can just put your datasource information in the web.xml file. The reason resin will look for a resin-web.xml file is because resin allows for some resin specific tags in the web.xml file and putting those tags in resin-web.xml allows you to keep the web.xml file adhearing to the j2ee specifications for that file in case you ever needed to deploy your app on another app server, you wouldn't have to mess with the web.xml.
Also (on the side), I downloaded the latest stable MySQL driver to use with Resin, but where does it go in Resin? I put it in my web app's lib direstory and declared the driver in the driver tag of the resin.conf file, but when I fire up the Resin server it says it can't load the driver class?
If you are using the resin.conf file to config your datasource, then the jdbc driver needs to be placed in the resin/lib folder. If you put the datasource in the resin-web.xml file, you can put the driver in the WEB-INF/lib folder of your web app.
Here is a sample resin-web.xml file that I was using.

the <database> tag is for my connection pool. The JDBCAuthenticator is for forms authentication using a database for the username and password. The XMLAuthenticator was for using a password.xml file for the username, password, and roles. You can find all this well documented on Resins web site.
[ December 21, 2003: Message edited by: Gregg Bolinger ]
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a hint to be a litle bit careful when looking at the examples at caucho.com. As far as I understand it, LunarPages uses Resin 2.1, while most of the recent decouments and examples at caucho.com are based on Resin 3.0.
LunarPages uses a shared JVM, so you don't have access to the basic container configuration, but luckily Resin provides a lot of configuration at the host and application level.
One suggestion is to download a recent Resin 2.1, install it locally, and play with the web app configurations. Just set up enough resin.conf so that you have a single "host", pointing to some area on your disc, then experiment with web.xml and resin-web.xml in that area. When you are happy, upload it to LunarPages and give it a try.
[ December 22, 2003: Message edited by: Frank Carver ]
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Greg and Frank
Most helpful
Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic