[JBoss-user] Thanks to replies of ejb debug and connection pool.

2001-04-10 Thread Ed Aihua Wu

Thanks for all the replies I have got from this email list.
I tried the System.out.println again, it works and this is what I want.
Also thanks for replies I got from my other posts like
connection pool.
Since this is the hottest mail list I ever cross over, I will
not send more thank messages to bother others.

Ed Wu

> Hi Ed:
>
> Actually, issuing an
>
>  System.out.println ( "Hello World!" );
>
> should print out on the console while JBoss is running. It works from an
entity
> or session bean.
>
> What rev of JBoss / JDK are you running?
>
>
> Kev
>
>
>
>
>
> "Ed Aihua Wu" <[EMAIL PROTECTED]> on 04/10/2001 12:55:26 AM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:(bcc: Kevin Monaghan/US/GM/GMC)
> Subject:  [JBoss-user] debug ejb bean
>
>
>
>
> I don't have any IDE to debug an ejb bean.
> I usually just put print statement in a java program to
> debug it.
> It doesn't work for ejb
> since it is inside a containner and System.out.println
> doesn't work.
>
> Can anybody tell me an easy way to debug ejb components?
> I don't have any IDE installed.  I want some String printed to
> a console.
>
> Thanks in advance.
>
> Ed Wu
>
>
> ___
> 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] debug ejb bean

2001-04-09 Thread Ed Aihua Wu

I don't have any IDE to debug an ejb bean.
I usually just put print statement in a java program to
debug it. 
It doesn't work for ejb
since it is inside a containner and System.out.println
doesn't work.

Can anybody tell me an easy way to debug ejb components?
I don't have any IDE installed.  I want some String printed to
a console.

Thanks in advance.

Ed Wu


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



Re: [JBoss-user] cann't get a connection from outside of the jboss container.

2001-04-09 Thread Ed Aihua Wu

I understand JBoss is a container and provide the
service to its components.
I have a stand-alone test program (not a component
inside the JBoss directories) and try to get a
connection from JBoss.  If a JSP page (it is not inside
the JBoss container) can
get a connection,  why can't a stand-alone client program
get a connection?

In the interest tutorial program
provided by JBoss, it has a client program
InterestClient.java,  it is run outside the container,
It works perfectly well.

So I should be able to get a connection even it is
outside of the JBoss.

Thanks for any help.

Ed Wu

- Original Message -
From: "Guy Rouillier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 7:54 AM
Subject: Re: [JBoss-user] cann't get a connection from outside of the jboss
container.


> Use
>
> lookup("java:comp/env/jdbc/mySQLDS")
>
> in your bean, then in your ejb-jar.xml use something like this
>
>
> A jdbc connection
> jdbc/mySQLDS
> javax.sql.DataSource
> Container
> 
>
> and finally in your jboss.xml use something like this:
>
>   
> 
>   mySQLDSndi-name>
>   jdbc/mySQLDSame>
> 
>   
>
> where the res-jndi-name is the name that shows up in the jboss console
> (after the java:/).  What exactly do you mean by "My java code (outside of
> the jboss container)"?  The whole purpose of JBoss (any app server) is to
> run inside the container.  If you are running outside, you don't need
jboss.
>
>
> - Original Message -
> From: "Ed Aihua Wu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, April 08, 2001 3:00 AM
> Subject: [JBoss-user] cann't get a connection from outside of the jboss
> container.
>
>
> > Hi,
> >
> > I am using jboss 2.1 and I am trying to get a connection
> > from the jboss connection pool.
> >
> > I have installed a jdbc driver in jboss,
> > then I started the jboss, I can see my driver
> > is started.
> > [mySQLDS] Starting
> > [mySQLDS] XA Connection pool mySQLDS bound to java:/mySQLDS
> > [mySQLDS] Started
> >
> > My java code (outside of the jboss container) is something like this:
> > (I have tryed java:comp/env/mySQLDS,  it doesn't work either.)
> >
> >   System.setProperty("java.naming.factory.initial",
> >  "org.jnp.interfaces.NamingContextFactory");
> >   System.setProperty("java.naming.provider.url",
> >  "localhost:1099");
> >   Context initial = new InitialContext();
> >   DataSource dataSource =
> >   (DataSource)initial.lookup("java:/mySQLDS");
> >   return dataSource.getConnection();
> >
> > The exception is something like this:
> >
> > javax.naming.NameNotFoundException: mySQLDS not bound
> > at
> > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
> > RemoteCall.java:245)
> > at
> > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
> > 220)
> > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> > at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
> > at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
> > at javax.naming.InitialContext.lookup(InitialContext.java:350)
> > at JDBCTest.getJbossConnection(JDBCTest.java:79)
> > at JDBCTest.go(JDBCTest.java:40)
> > at JDBCTest.main(JDBCTest.java:29)
> >
> > Thanks for any help.
> >
> > Ed Wu
> >
> >
> > ___
> > 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] cann't get a connection from outside of the jboss container.

2001-04-07 Thread Ed Aihua Wu

Hi,

I am using jboss 2.1 and I am trying to get a connection
from the jboss connection pool.

I have installed a jdbc driver in jboss,
then I started the jboss, I can see my driver
is started.
[mySQLDS] Starting
[mySQLDS] XA Connection pool mySQLDS bound to java:/mySQLDS
[mySQLDS] Started

My java code (outside of the jboss container) is something like this:
(I have tryed java:comp/env/mySQLDS,  it doesn't work either.)

  System.setProperty("java.naming.factory.initial",
 "org.jnp.interfaces.NamingContextFactory");
  System.setProperty("java.naming.provider.url",
 "localhost:1099");
  Context initial = new InitialContext();
  DataSource dataSource =
  (DataSource)initial.lookup("java:/mySQLDS");
  return dataSource.getConnection();

The exception is something like this:

javax.naming.NameNotFoundException: mySQLDS not bound
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at JDBCTest.getJbossConnection(JDBCTest.java:79)
at JDBCTest.go(JDBCTest.java:40)
at JDBCTest.main(JDBCTest.java:29)

Thanks for any help.

Ed Wu


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