• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Setting up a datasource in WebSphere

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using RAD but this is more of a question about how datasources are setup in Websphere in general. I'm trying to explain what I know and I have some questions at the end. Please correct me if I'm wrong. Any help is appreciated!

From my perspective, it seems like it can be done two ways? In the admin console or through modifying the application.xml and web.xml files?

In the admin console, I would create the datasource via the Resources tab and when installing the application, I would bind the datasource to the web modules.

The other way which I'm setup now is to setup the datasource in the application.xml file, under the deployment tab when viewed in RAD. I will also have to bind the datasource in the web.xml file, references tab. No config is necessary in the admin console for this method.

So what's the difference of both of the methods? I can see how it will be useful to define it in the application.xml file since we don't have to recreate the datasource for every different server. Anything else?

Which is more commonly used?
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you configure the datasource in the xml files, you are creating a rapidly deployable application, which is fun in the test environment, but administrators hate it - from my perspective, it is not a scalable or manageable solution.

The ability to configure datasources right alongside the xml files is new with WebSphere 6. Maybe I haven't used itenough, but it seems to take alot of control away from Administrators at deployment time.

Set your datasources up manualy on you app server. It's better.

-Cameron McKenzie
 
Kevin Cheong
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. That really helps. I think the deployment descriptors help for local use since you don't want to be setting up the bindings each time you recompile and deploy your code on your local machine.

I can see how it will be a limitation once you use that EAR file in other environments, using different schemas/user, url, etc.

Do you know which file to exclude from the EAR file to exclude this? I want it setup on my local machine but I don't want it in the EAR which I'm using Ant to build.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic