Hi darranl, tks for answer... (i'm trying in english)

This is my client code, and yes, it is executing in other jvm (in that way must be or 
not?)

public static void main (String[] args) throws Exception {
  | Properties env = new Properties();
  | 
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
  | env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
  | env.setProperty("j2ee.clientName", "test-client");
  | Context ctx = new InitialContext(env);              
  | System.out.println(ctx.getEnvironment().toString());
  |             
  | Object obj=ctx.lookup("java:comp/env/PostgresDS");
  | Class[] inte =obj.getClass().getInterfaces();
  | for (int i= 0 ; i <inte.length ; i++){
  | System.out.println(inte.getName()+" "+inte.getClassLoader());
  | }
  | /* In this point raise ClassCastException/*
  | DataSource ds = (DataSource) ctx.lookup("java:comp/env/PostgresDS");
  | ...


I did all that understand that suposee to do... and in my jmx-console i have    

GLOBAL NAMESPACE

  +- test-client (class: org.jnp.interfaces.NamingContext)
  |   +- PostgresDS[link -> java:/PostgresDS] (class: javax.naming.LinkRef)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- PruebaSession[link -> PruebaSession] (class: javax.naming.LinkRef)
  

and in java: namespace is the data source

  +- PostgresDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)


In other client a get the ejb succesfull, but the same code doesnt work to get the 
Datasource... however the error is not by jndi... is cause the cast...

My .ear doesnt have any jar or something where javax.sql.DataSource is been reloaded, 
and not is in the postgresql-jdb.jar... so i dont know why is lost...     



<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3826183#3826183";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3826183>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to