Assuming when you say "outside of JBoss" you mean in a different JVM, no.

----- Original Message -----
From: "Russell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 12:30 AM
Subject: Re: [JBoss-user] Get Database connection from Jndi


> Hi Guy ,
>
>   I am trying to access dbconnection from jboss connection pool outside
> of
>   JBoss.
>
>   Can it be done ??
>
>   Thanks
>
>
> Guy Rouillier wrote:
> >
> > What do you mean by "Can we accessed jndi that binding in jboss outside
ejb
> > bean ??"  There have been numerous discussions on this list over the
last
> > two weeks concerning the use of a DB connection from a JBoss connection
pool
> > outside of JBoss (can't be done.)  But your message sounds like you are
> > doing something else (in jboss outside ejb).  Explain what you are
trying to
> > do.
> >
> > ----- Original Message -----
> > From: "Russell" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 25, 2001 10:09 PM
> > Subject: [JBoss-user] Get Database connection from Jndi
> >
> > >
> > >
> > >   Hi all ,
> > >
> > >    I am using RedHat6.1 , jdk1.3 and jboss2.1.
> > >    Recently i have been trying to access database connection from
> > > binding datasource in jboss.
> > >    The error is "NamingNotFoundException error"
> > >
> > >    Can we accessed jndi that binding in jboss outside ejb bean ??
Thanks
> > > wt
> > >
> > >    below is my code :
> > >
> > >    public static void main(String [] args){
> > >
> > >
> >
> > >       Properties props = new Properties();
> > >       props.put(Context.INITIAL_CONTEXT_FACTORY,
> > > "org.jnp.interfaces.NamingContextFactory");
> > >       props.put(Context.PROVIDER_URL, "localhost:1099");
> > >       Context ctx = new InitialContext();
> > >
> > >       ds = (DataSource)ctx.lookup("java:comp/env/jdbc/PostgresDS");
> > >      }
> > >      catch(Exception e){}
> > >
> > >     }
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to