• 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

Initial Context question

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We currently use WSAD 5.1 to do our development here but are moving off to Eclipse and JBoss. Our production environments will still be Websphere and we'd like to have one codebase that works in both.

One place that won't work with JBoss is creating the InitialContext with parameters (com.ibm.websphere.naming.WsnInitialContextFactory) as we currently do. In JBoss, we created an InitialContext with no parameters and it worked fine in WSAD as well on our local environments.

The question I have is why should I specify "com.ibm.websphere.naming.WsnInitialContextFactory" as the INITIAL_CONTEXT_FACTORY when creating the InitialContext? Do I lose anything by not doing this?

Thanks,

Jon
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jon,
Welcome to JavaRanch. This sounds like a WebSphere question, so I'm moving to our IBM/WebSphere forum for you.

Jeanne
Forum Bartender
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't worry too much, using InitialContext() no-arg is very common way access method.

I would worry about trying to write software that works perfectly simoultaneously in WebSphere and JBoss. I can say from personal experience that despite the goal of J2EE to be WODA (Write Once Deploy Anyway) some applications, like WebSphere, are not that light-weight. Configuring the stub generation and JNDI connections accross multiple distinct J2EE is no easy feat. On top of that, WebSphere has a slew of proprietary code that you have to be careful not to use else you won't be able to run it on the JBoss server. You have to have very good build/deploy scripts for both servers.

I wish you luck though.
 
What? What, what, what? What what tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic