Gerald Holl wrote:
> Dies Koper wrote:
>
>> Any chance that you forgot to specify that integrity or
>> confidentially is REQUIRED in the sun-ejb-jar.xml definition for the
>> bean you are looking up?
>> Note that first the naming service (on 3700) is accessed and the IOR
>> that is returned will redirect the ACC to the SSL port provided that
>> your bean is defined to require SSL.
>
>
> Do I need both annotations and sun-ejb-jar.xml to configure the bean
> correctly?
yes you need both. Are you still stuck with the error after adding
sun-ejb-jar.xml to your service ?.
rgds,
kumar
>
> Example:
>
> package server;
>
> @Remote
> public interface MyServer {
> public String getInfo() throws RemoteException;
> }
>
>
> package server;
>
> @Stateless
> public class MyServerImpl implements MyServer {
> public String getInfo() throws RemoteException {
> return "info";
> }
> }
>
> sun-ejb-jar.xml:
> <sun-ejb-jar>
> <enterprise-beans>
> <ejb>
> <ejb-name>server.MyServerImpl</ejb-name>
> <jndi-name>ejb/MyServer</jndi-name>
> <ior-security-config>
> <transport-config>
> <integrity>required</integrity>
> <confidentiality>required</confidentiality>
> <establish-trust-in-target>supported</establish-trust-in-target>
> <establish-trust-in-client>supported</establish-trust-in-client>
> </transport-config>
> <sas-context>
> <caller-propagation>supported</caller-propagation>
> </sas-context>
> </ior-security-config>
> </ejb>
> </enterprise-beans>
> </sun-ejb-jar>
>
>
>
> And here the lookup code of the standalone client:
> System.setProperty("javax.net.ssl.trustStore", "client.keystore");
> System.setProperty("javax.net.ssl.trustStorePassword", "abc");
> System.setProperty("javax.net.ssl.keyStore", "client.keystore");
> System.setProperty("javax.net.ssl.keyStorePassword", "abc");
> System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
> System.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
> InitialContext ctx = new InitialContext();
> server = (MyServer) ctx.lookup("ejb/MyServer");
>
>
>
> This lookup code is not working because I get a NamingException:
> MyServer not found.
> What's wrong in the above code?
>
>
> Thanks,
> Gerald
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>