• 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

JNDI Properties for Oracle 10g AS(904)

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I have written an Junit test case to test EJB that is deployed in Oracle 10g AS(904).

As I my Jnuit will be remote client that acess EJB, I will have to specify JNDI properties to get the Initial context.

I was wondering what should be the values for Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS

There is an application specific logon module confiugred in jazn-data.xml file.

Does values for the above two properties should be user name and password used to login into Enterprise Manager or they represents username and password that are used to log into the application.

If I user enterprise manager username and password, I am getting following exception


If I user application specific user name and password, I am getting following exception

Your input would be a great help to me

thank you
[ January 26, 2005: Message edited by: s penumudi ]
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Out of the box, I believe you need the following (assume env is a Hashtable):

env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Robert,
In Penumudi's version of OC4J, out-of-the-box, it uses JAZN security.
Personally, in order not to use JAZN, I modify the configuration files.
These are XML files that are located in the "j2ee/home/config" subdirectory
of the OC4J installation (for the OC4J stand-alone version -- as opposed to
the complete Oracle Application Server). I can't verify it now, but I believe
you need to change the "application.xml" file. In any case, there is a comment
in the relevant file that tells you what to do.

Now if you do decide to use "principals" (as opposed to JAZN) security, the
"admin" user password you need to use is the one you defined when you installed
OC4J.

Remember, the above relates to OC4J stand-alone version 9.0.4

Good Luck,
Avi.
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response,
I am using Oracle 10g AS (904) full install application server not standalone.

I guess I cannot change application.xml files or any configuration files etither because when I want to test my EJB i also want to test them with user group roles.

Any other ideas?
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Avi Arbami,
I have installed OC4J standalone and I am facing problem
I haven't changed application.xml file in config directory though.

Can you please suggest me how to go about this now. I am not sure how I should be proceeding futher with this exception.

I said obeserved this though. When I use
env.put(Context.PROVIDER_URL, "opmn rmi://localhost::home/AppName"); in place of
env.put(Context.PROVIDER_URL, "ormi://localhost:23791/AppName");

I am able to get the context but when I lookup for EJB, I am getting NameNotFoundException.

Any thoughts. Please help me.. I am fighting with this for couple of days and being unproductive..
[ February 02, 2005: Message edited by: s penumudi ]
 
Avi Abrami
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Penumudi,
First you have to decide whether you want to use OC4J stand-alone,
or Oracle 10g Application Server -- since they are two different products.
I only have experience using OC4J stand-alone -- so I cannot help you with
10gAS.

For your information, you can find lots of information about both 10gAS and
OC4J from this Web page:

http://www.oracle.com/technology/products/ias/index.html

Good Luck,
Avi.
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Avi Abrami
For development, I will be using OC4J standalone.

I know that opmn rmi://localhost::inst_name/appName is used for looking remote object from Oracle 10g AS.

I should be using ormi://localhost:rmi_port/appName for OC4J standalone.

Anyways thanks for your response.
 
Robert Hayes
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had this same problem a while back. Check out this link, it should help:

http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10324/primer.htm#1019737
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic