File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.setSecurityManager(new RMISecurityManager());

 
thomas davis
Ranch Hand
Posts: 207
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we need to use the following lines while calling ejb form client (Servlet) ?
System.setSecurityManager(new RMISecurityManager());
Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "allaire.ejipt.ContextFactory");
properties.setProperty(Context.PROVIDER_URL, "ejipt://127.0.0.1:2323");
Application Server Jrun 3.0
Could someone explain each and every step listed above?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Context.INITIAL_CONTEXT_FACTORY tells us the Contextimplementation and
Context.PROVIDER_URL the location of the JNDI server.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do we need to use the following lines while calling ejb form client (Servlet) ?
System.setSecurityManager(new RMISecurityManager());

I have never had to call System.setSecurityManager() for an EJB client -- be it standalone Java program, a servlet on the same server, or a servlet on a dedicated web container. Maybe JRun documentation explains the reason?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We usually use the securitymanger when doing an RMI call using JRMP.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic