well you need

1- the servlet stuff to see the InitialContext from jboss... something you
need to specify in jndi.properties
2- the db connection under it's "original" container name and not the java:
name (can't remember, have to look at the code naming hookup) jboss puts it
under a name I can't remember for now, can you look at the containerFactory
or something?

java: needs to be hooked up on the client and we need to code that, for now
it is a "bean" thing.  This you can work around by 2

marc


|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Bill Pfeiffer
|Sent: Saturday, October 21, 2000 6:25 AM
|To: jBoss
|Subject: RE: [jBoss-User] servlet access to cached db connections
|
|
|Hi marc,
|
|I get the same error: "system is not bound" when I do the lookup using
|"system/jdbc/InetSQLServer".  Am I missing some configuration item here?
|Its almost as if the tomcat stuff can see any of the namespace that jBoss
|has set up.  Although I am able to at least get a javax.naming.Reference
|object when I do a lookup on "InetSQLServer" by itself.  Note that I don't
|actually get the actual cached datasource object, just the reference class.
|
|Thanks for the help,
|
|Bill Pfeiffer
|
|> -----Original Message-----
|> From: [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]]On Behalf Of marc fleury
|> Sent: Saturday, October 21, 2000 1:40 AM
|> To: jBoss
|> Subject: RE: [jBoss-User] servlet access to cached db connections
|>
|>
|> Bill,
|>
|> you are looking at java: which for jboss is a thread local
|environment (ie
|> you won't see it in tomcat).
|>
|> I can't remember where we put the datasources under jndi, all I
|> know is that
|> they are under "global" names, the jndi stuff is for beans only.
|>
|> Sorry I can't be of more help, i did go in the source but
|> couldn't find the
|> place where we give the name to the sources (does anyone remember?), also
|> they are not supposed to be looked up directly but in your case
|> it is a work
|> around (is it system/jdbc/<name>)....
|>
|> regards
|>
|> marc
|>
|>
|>
|>
|>
|> |-----Original Message-----
|> |From: [EMAIL PROTECTED]
|> |[mailto:[EMAIL PROTECTED]]On Behalf Of Bill Pfeiffer
|> |Sent: Friday, October 20, 2000 8:41 PM
|> |To: jBoss
|> |Subject: RE: [jBoss-User] servlet access to cached db connections
|> |
|> |
|> |OK, I'll take one more stab at explaining what I am trying to do and
|> |hopefully clear things up so I can get this working:
|> |
|> |I have written an application for Tomcat 3.2.  I used Minerva
|for pooling
|> |jdbc connections with an eye towards integrating with jBoss.  I am
|> |trying to
|> |do that now.  I have several servlets and jsps that depend on getting a
|> |connection from a Minerva based connection cache.  I have
|> encapsulated the
|> |code to get the connection cache into a single class.
|> |
|> |As far as I know, I am running the full inVM integration (what indicated
|> |that I wasn't?).  With patched Tomcat 3.2? I downloaded it just
|> a few days
|> |ago (binary).  I stepped through jBoss online docs for running
|> Tomcat inVM
|> |and I can attach to the main page of my Tomcat app which doesn't
|> require db
|> |access.
|> |
|> |Now I tried running my code as is, but it bombed becuase I could
|> |not include
|> |the jBoss jar (in support of my encapsulated class calling
|> Minerva) as I do
|> |when I run Tomcat standalone (jBoss complained when I tried to).
|> |
|> |Ricard pointed out that I should do a jndi lookup to get at the
|> connection
|> |cache.  I rewrote my class to do so and, as I pointed out in my
|> last post,
|> |this fails with an error indicating that the "comp" is not
|bound.  Please
|> |note that I do have jBoss setup for connection caching of my db
|> |(or so jBoss
|> |indicates when it starts up).
|> |
|> |My requirement seems very simple.  I need access to a cached db
|> connection.
|> |I had it with Tomcat/Minerva.  I don't have it with
|Tomcat/jBoss/Minerva.
|> |My preference is to use the connection cache as configured under
|> jBoss, but
|> |at this point, I'd just like to get my app working.
|> |
|> |Anybody?
|> |
|> |Thanks to all for the help,
|> |
|> |
|> |Bill Pfeiffer
|> |
|> |> -----Original Message-----
|> |> From: [EMAIL PROTECTED]
|> |> [mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Mulder
|> |> Sent: Friday, October 20, 2000 11:00 PM
|> |> To: jBoss
|> |> Subject: RE: [jBoss-User] servlet access to cached db connections
|> |>
|> |>
|> |>   If you're not using the full inVM integration (with patched Tomcat
|> |> source code and all) then you can't access jBoss pools from servlets -
|> |> the DB connections aren't remote or serializable so they can't cross
|> |> ClassLoader or VM boundaries.
|> |>
|> |> Aaron
|> |>
|> |> On Fri, 20 Oct 2000, Bill Pfeiffer wrote:
|> |> > When I try to access the DataSource using jndi:
|> |> >
|> |> >       Context naming = new InitialContext();
|> |> >       DataSource dataSource =
|> |> > (DataSource)naming.lookup("java:comp/env/InetSQLServer");
|> |> >
|> |> > I get the following exception:
|> |> >
|> |> >         javax.naming.NameNotFoundException: comp not bound
|> |> >
|> |> > But the name does APPEAR to be bound (from jBoss output):
|> |> >
|> |> >         [XADataSource] XA Connection pool InetSQLServer bound to
|> |> InetSQLServer
|> |> >         [XADataSource] Started
|> |> >
|> |> > When I try looking up just "InetSQLServer" I get a datatype of
|> |> > javax.naming.reference (or something like that)
|> |> >
|> |> > What's up with this?
|> |> >
|> |> > Bill Pfeiffer
|> |> >
|> |> >
|> |> > > -----Original Message-----
|> |> > > From: [EMAIL PROTECTED]
|> |> > > [mailto:[EMAIL PROTECTED]]On Behalf Of
|Rickard Oberg
|> |> > > Sent: Friday, October 20, 2000 9:59 AM
|> |> > > To: jBoss
|> |> > > Subject: Re: [jBoss-User] servlet access to cached db connections
|> |> > >
|> |> > >
|> |> > > Hey
|> |> > >
|> |> > > > I have a web app in tomcat 3.2b? that has been working
|> |fine.  When I
|> |> > > created
|> |> > > > the web app, I had an eye on integrating it with jBoss.  As
|> |> such, I used
|> |> > > the
|> |> > > > Minerva classes for my db connection caching.  As stated, this
|> |> > > works fine.
|> |> > > >
|> |> > > > I am now to the point of integrating the my web app into
|> |> jBoss.  When I
|> |> > > try
|> |> > > > to load my web app (via the MBean admin page), I get the
|> |> > > following error:
|> |> > > >
|> |> > > > java.lang.reflect.InvocationTargetException: [EmbededTomcat]
|> |> > > > java.lang.NoClassDefFoundError:
|> |> > > > org/jboss/minerva/datasource/JDBCPoolDataSource
|> |> > > >         at
|> |> > > >
|> |> > > com.bpcs.jdbc.MinervaConnPoolFactory.createOasisConnectionPool(Min
|> |> > > ervaConnPo
|> |> > > > olFactory.java:28)
|> |> > > >
|> |> > > > It appears that the Minerva classes cannot be found.  Am I
|> |missing a
|> |> > > config
|> |> > > > item somwhere?  TIA, for any help here!
|> |> > >
|> |> > > Connection pools are managed outside of apps in jBoss. All you
|> |> > > have to do is
|> |> > > look them up from the java:comp/env namespace.
|> |> > >
|> |> > > /Rickard
|> |> > >
|> |> > >
|> |> > >
|> |> > >
|> |> > > --
|> |> > > --------------------------------------------------------------
|> |> > > To subscribe:        [EMAIL PROTECTED]
|> |> > > To unsubscribe:      [EMAIL PROTECTED]
|> |> > > Problems?:           [EMAIL PROTECTED]
|> |> > >
|> |> > >
|> |> >
|> |> >
|> |> >
|> |> > --
|> |> > --------------------------------------------------------------
|> |> > To subscribe:        [EMAIL PROTECTED]
|> |> > To unsubscribe:      [EMAIL PROTECTED]
|> |> > Problems?:           [EMAIL PROTECTED]
|> |> >
|> |>
|> |>
|> |>
|> |> --
|> |> --------------------------------------------------------------
|> |> To subscribe:        [EMAIL PROTECTED]
|> |> To unsubscribe:      [EMAIL PROTECTED]
|> |> Problems?:           [EMAIL PROTECTED]
|> |>
|> |>
|> |
|> |
|> |
|> |--
|> |--------------------------------------------------------------
|> |To subscribe:        [EMAIL PROTECTED]
|> |To unsubscribe:      [EMAIL PROTECTED]
|> |Problems?:           [EMAIL PROTECTED]
|> |
|> |
|>
|>
|>
|> --
|> --------------------------------------------------------------
|> To subscribe:        [EMAIL PROTECTED]
|> To unsubscribe:      [EMAIL PROTECTED]
|> Problems?:           [EMAIL PROTECTED]
|>
|>
|
|
|
|--
|--------------------------------------------------------------
|To subscribe:        [EMAIL PROTECTED]
|To unsubscribe:      [EMAIL PROTECTED]
|Problems?:           [EMAIL PROTECTED]
|
|



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to