Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InitialContext creation WAS 5.0

 
Gunther Verhemeldonck
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I deployed an application and when I tried to look up one of the session beans, it failed to construct an InitialContext object using the default contstructor. When I specify the factory and url, everything works.

I don't want to specify host specific things! What will happen when I enable clustering? I loose transparency! What is the diffence between the 2 approaches? I just want to use the default constructor !!
Anybody any ideas?
thanx in advance ...
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean a standalone Java application that's an EJB client, or a Web application? If it's a standalone Java application, the issue is one of which client container you use. Do a search in the InfoCenter for "launchClient.bat" and read up on the J2EE client container.
Kyle
 
Gunther Verhemeldonck
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah ok, I get it.
I don't run in a client container. I just lookup the bean in a main()-method.
I'll try to package the client so that it does.
Any hints?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lots of them in the EJB client development chapter in my book (below).
Kyle
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic