File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Sample code for initiate secured JNDI lookup to create EJB object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Sample code for initiate secured JNDI lookup to create EJB object" Watch "Sample code for initiate secured JNDI lookup to create EJB object" New topic
Author

Sample code for initiate secured JNDI lookup to create EJB object

Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi,

I am new to IIOP/SSL. If the EJB container is SSL enabled, how the client side can initiate the secured SSL JNDI lookup and create EJB object?

Please help and provide simple sample code.


Thanks
Benson
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Hello Ben,

Hope these links help if you haven't already read them.

sasl_auth

SSL LDAP


Shailesh Kini.
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi Shaliesh,

Thanks for your suggestion in the first place.
I am wondering if the protocol is jnp instead of ldap during doing the EJB lookup, what is the port number of that? And how to do the EJB lookup?


Thanks
Benson
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Hello Benson,

Here's a link to the ejb lookup example

EJB Lookup

Generally LDAP services listen on Port 389 for non-SSL and Port 636 for ssl. But these ports numbers are configurable.
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi Shailesh,

Happy new year. Thanks for your help.
Can you tell me how to write the URL for ssl?


Thanks
Benson
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Hello Benson,

Happy New Year to you too!

If you have all your ejb's deployed on the LDAP server that is ssl enabled then in my opinion you should be create an initial context with some SSL specific properties. Please re-read the document SSL LDAP especially "Using the SSL Socket Property" section to understand how to do a lookup on a SSL enabled LDAP server.
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi Shailesh,

I am still very confused.

Please go through the following 3 hyperlink which are about how to access EJBs through SSL. There are 3 different configuration in JBOSS or the client stub.
Please take a look first. It really makes me crazy.

http://labs.jboss.com/jbossejb3/docs/tutorial/ssl/ssl.html
http://labs.jboss.com/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/beta422/html/JNDI_over_HTTP-Accessing_JNDI_over_HTTPS.html
http://labs.jboss.com/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/beta422/html/Security_on_JBoss-Using_SSL_with_JBoss_using_JSSE.html

thank you very much
Benson
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Hello Benson,

I still do not understand your confusion.

These 3 documents indicate 3 different ways to access the EJB container.

1. SSL
2. HTTPS
3. RMI

You have to just pick the one that's most appropriate in your situation. RMI does not work if your client tier is outside the DMZ.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sample code for initiate secured JNDI lookup to create EJB object
 
Similar Threads
how to run it..........??
Need to call SessionBean from my MessageDrivenBean
InitialContext
ejb
Lookup EJB on Different Application servers