Hi,

It seems that you use JOnAS inside Enhydra.
In this case, it is better to use the mailing list:
        [EMAIL PROTECTED]
instead of the jonas-users mailing list.
(I send this mail to this Enhydra mailing list.)

Thanks.
Hélène.

Thierry Templier wrote:
> 
> Hello,
> 
> I try to write a client application to access jonas server ressources ( ejb, pool ) 
>but I can't set an intialContext.
> I have the follwing exception:
> java.lang.SecurityException: sealing violation
> 
> This is my code source:
> 
> import java.io.IOException;
> import java.io.PrintWriter;
> import java.util.Enumeration;
> import javax.servlet.*;
> import javax.servlet.http.*;
> import javax.naming.InitialContext;
> import javax.naming.Context;
> import javax.sql.DataSource;
> import java.sql.Connection;
> import java.sql.Statement;
> import java.util.Hashtable;
> 
> public class Test {
>         public static void main(String[] args) {
>                 Context initialContext = null;
>                 try {
> 
>                         Hashtable hash=new Hashtable();
>                         hash.put("java.naming.provider.url","jrmi://localhost:1099");
>                         hash.put("java.naming.factory.initial",
>                                                                          
>"org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory");
>                         hash.put("java.naming.factory.url.pkgs",
>                                                                          
>"org.enhydra.naming.jndi:org.enhydra.naming.jndi");
>                         hash.put("java.naming.factory.state",
>                                                                          
>"org.enhydra.naming.jndi.EnhydraStateFactory:org.enhydra.naming.jndi.EnhydraStateFactory");
>                         initialContext = new InitialContext(hash);
>                 } catch (Exception e) {
>                         System.out.println("Cannot get initial context for JNDI: " + 
>e);
>                         return;
>                 }
> 
>                 // lookup datasource
>                 DataSource ds = null;
>                 try {
>                         ds = 
>(DataSource)initialContext.lookup("ems:Services/JdbcServiceManager/deployed/jdbc_1");
>                 } catch (Exception e) {
>                         System.out.println( "Cannot lookup DataSource" + e);
>                         return;
>                 }
> 
>                 if( ds!=null )
>                         System.out.println("ds != null");
>                 else
>                         System.out.println("ds == null");
>         }
> }
> 
> I don't know too which jar files to include in the classpath of the java process.
> 
> Can anyone help me.
> Thanks
> Templ
> 
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

-- 
-=- Hélène JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]   http://www.evidian.com
  Phone: 33.4.76.29.73.53            Fax: 33.4.76.29.76.00
  Download our EJB Server JOnAS at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to