Note that there are some explanatory texts on larger screens.

plurals
  1. POstandalone rcp application, access secured EJBs, glassfish
    primarykey
    data
    text
    <p>I want to access EJBs with security.. I am developing an <code>eclipse rcp</code> application and I want to connect to a <code>glassfish 3.1.1</code> server that has some <code>EJB</code>s secured and I want to connect to that <code>EJB</code>s using <code>Java EE 6 security</code></p> <p>I found something like this:</p> <pre><code>ProgrammaticLogin pm = new ProgrammaticLogin(); pm.login(usernameText.getText(), passwordText.getText()); Properties props = new Properties(); props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); // optional. Defaults to localhost. Only needed if web server is running on a different host than the appserver props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost"); // optional. Defaults to 3700. Only needed if target orb port is not 3700. props.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); try { Context ctx = new InitialContext(props); } catch (NamingException e) { e.printStackTrace(); } </code></pre> <p>I included all <code>jar</code>s from glassfish appclient.jar <code>glassfish3/glassfish/bin/package-appclient</code></p> <p>Example errors:</p> <pre><code>SEVERE: SEC9050: Programmatic login failed com.sun.enterprise.security.auth.login.common.LoginException: javax.security.auth.login.LoginException: No LoginModules configured for default at com.sun.enterprise.security.auth.login.LoginContextDriver$9.run(LoginContextDriver.java:889) ... </code></pre> <p>Do you know how to securely login to <code>EJB</code>s using any method for a desktop application?</p> <p>My references:</p> <ol> <li><a href="http://docs.oracle.com/javaee/6/tutorial/doc/bnbwj.html" rel="nofollow">Java EE 6 tutorial - security</a></li> <li><a href="http://www.java-tips.org/java-ee-tips/enterprise-java-beans/accessing-a-secure-enterprise-bean-from-a-java-client-or-through-java-web-start-techn.html" rel="nofollow">Java-Tips: accessing a secure EJB from a client</a></li> </ol> <p>If you know the answer.. can you, please, provide me examples?</p> <p>Thank you in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload