Re: RE: [JBoss-user] standalone J2EE java client

2001-06-18 Thread Victor Lan

Hi Chris,

I believe what you and Tahir described is simply a fat client, not a 
J2EE client, the most important difference being that the latter has 
access to the java:comp/ namespace.  The application-client.xml file can 
be thought of as a deployment descriptor for the J2EE client, wherein 
references to other J2EE resources are defined.

As Keith said, other app servers, such as the RI, do have support for 
this.  I have asked this same question before, and got no response, so 
I'm guessing that JBoss does not have support for this.

Victor



- Original Message -
From: "Kimpton,C (Chris)" <[EMAIL PROTECTED]>
Date: Monday, June 18, 2001 11:36 am
Subject: RE: [JBoss-user] standalone J2EE java client

> Hi,
> 
> I am not sure to what facility you are referring - are you looking 
> to run
> the client in the same VM as the JBoss server?  In which case, you 
> can do
> this - but obviously only one client can do this, the other 
> clients will
> presumably want to talk to the same JBoss VM?  Or is it a single 
> user kind
> of app anyway?
> 
> I don't remember anything about the application-client.xml - 
> perhaps someone
> with experience of this can answer you.
> 
> JBoss does support ejb-refs that allow you to connect to server 
> resources,if that is what you are after.
> 
> HTH,
> Chris
> 
> > -Original Message-
> > From: Keith Kee [mailto:[EMAIL PROTECTED]]
> > 
> > Hi Chris,
> >I also like to use the ejb-ref specified in the 
> > application-client.xml,
> > and the container security. The J2EE reference 
> > implementation, weblogic and
> > iplanet have this facility, so that the fat client can be run in an
> > application container. I wonder if JBoss has such a thing as well.
> > 
> > Thanks,
> > keith
> > 
> 
> 
> > >From: "Kimpton,C (Chris)" <[EMAIL PROTECTED]>
> > >If by this, you mean a standalone application/VM that talks 
> > to another VM
> > >running JBoss, then yes, it does.  Such as a fat client GUI...
> > >
> > >You "just" need to have the jboss client jars in your 
> standalone apps
> > >classpath and have it configured to find your jndi server - 
> which is
> > >probably your jboss server machine.
> > >
> 
> 
> > 
> > > -Original Message-
> > > From: Keith Kee [mailto:[EMAIL PROTECTED]]
> > >   I have been searching the mailing list archive and the=20
> > > manual, but do not
> > > seem to be able to find any mention about the support for=20
> > > standalone J2EE
> > > java client. Does JBoss support that?
> > >=20
> 
> 


> This electronic message (email) and any attachments to it are 
> subject to copyright and are sent for the personal attention of 
> the addressee. Although you may be the named recipient, it may 
> become apparent that this email and its contents are not intended 
> for you and an addressing error has been made. This email may 
> include information that is legally privileged and exempt from 
> disclosure. If you have received this email in error, please 
> advise us immediately and delete this email and any attachments 
> from your computer system.Rabobank International is the trading 
> name of Coöperatieve Centrale Raiffeisen-Boerenleenbank B.A. which 
> is incorporated in the Netherlands. Registered with the Registrar 
> of Companies for England & Wales No. BR002630 and regulated by the 
> SFA for the conduct of investment business in the UK.
> 
> The presence of this footnote also confirms that this email has 
> been automatically checked by Rabobank International for the 
> presence of computer viruses prior to it being sent, however, no 
> guarantee is given or implied that this email is virus free upon 
> delivery.
> ==
> 
> 
> ___
> 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



Re: [JBoss-user]

2001-06-07 Thread Victor Lan

No, I believe an env-entry is only accessible within the java:comp 
namespace, which is inacessible to non-J2EE clients.  In fact, the 
env-entry as declared below is not even accessible to other EJBs because 
you need to declare it for every bean that refers to it (in the 
deployment descriptor).

Some app servers (such as the reference implementation) support 
J2EE-clients, so that you can run your client within a J2EE container, 
therefore, giving you access to the java:comp namespace.  I don't know 
if JBoss supports this.  Anybody knows?

Victor

- Original Message -
From: "Richard Hutton" <[EMAIL PROTECTED]>
Date: Thursday, June 7, 2001 2:36 pm
Subject: [JBoss-user] 

> Hi
> 
> Is it possible to create environment entries in jndi which then 
> can be then
> looked up
> outside of the app server
> 
> e.g 
>test
>TEST_ENTRY
>java.lang.String
>test value
>   
> I have done this in the web.xml file and have an empty jboss-
> web.xml file
> under WEB-INF works fine when
> a servlet does a look up e.g java:comp/env/TEST_ENTRY works fine.
> Unfortunately i get a NameNotBoundException when run
> ocally( lookup(TEST_ENTRY) & lookup(env/TEST_ENTRY)
> 
> Any thoughts?
> 
> Richard
> 
> 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



Re: [JBoss-user] How do I specify a resource (properties file)for a bean to look up

2001-05-14 Thread Victor Lan

I'm not sure if you can reference a Properties from a bean.  How would 
you bind the Properties to JNDI?

I also have log4j setup for my beans.  I reference the log4j properties 
file as an , and look it up in the java:comp/env space.

Victor

- Original Message -
From: "Otis Gospodnetic" <[EMAIL PROTECTED]>
Date: Friday, May 11, 2001 9:18 am
Subject: [JBoss-user] How do I specify a resource (properties file) for 
a bean to look up

> Hello, 
>   
> I am writing a bean for logging (using log4j), to be
> used by other beans. 
> I would like to do the following, but am unsure about
> where and how to define the log4j properties file as
> an EJB Container resource: 
>   
> Make a properties-file available for the EJB Container
> as resource, define a logical name of this resource in
> the xml-files(Which ones? In the Deployment
> Descriptor? ejb-jar.xml?) 
> 
> So far I have:
> In ejb-jar.xml:
> ...
> 
>  LogManagerEJB
>  ...
>  
>LogManager Properties File
>LogManagerProperties 
>java.util.Properties
>Container
>  
> ...
> 
> 
> In my app's jboss.xml:
> ...
> 
>  LogManagerEJB
>  util/LogManager
> 
> ...
> 
> Is this right so far? Are those two linked via ejb-name
> (LogManagerEJB in both cases)?
> One thing that is definitely missing is the location of the
> properties file, a path to it.
> How and where would I specify that?
> 
> 
> I assume that after I get the above right I could then
> somehow ask for this resource from within my logging
> bean and configure log4j based on the properties from
> that config/properties resource file. 
> 
> It seems in my LogManagerBean I would write something like:
> 
> Properties p = (Properties)(new
> InitialContext()).lookup("???");
> 
> What goes in place of '???'?
> 
> 
> Still learning... :)
> Thank you,
>   
> Otis
> 
> ___
> 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] j2ee app client support

2001-04-19 Thread Victor Lan

Does jBoss support running a j2ee app client within a container?  
Something like "runclient.bat" in the J2EE reference implementation?

Victor


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



Re: [JBoss-user] Tomcat-JBoss ClassNotFoundException (again)

2001-04-19 Thread Victor Lan

In addition to the tomcat+jboss howto, you should read the "Deployment 
on JBoss" section.

Also, get the tomcat-test.ear app from the contrib suite to see how it's 
done.

It does work.

Victor

- Original Message -
From: "Bill Pfeiffer" <[EMAIL PROTECTED]>
Date: Thursday, April 19, 2001 11:37 pm
Subject: [JBoss-user] Tomcat-JBoss ClassNotFoundException (again)

> Has anyone successfully deployed a non trivial .ear (ie something 
> other than
> the example ear) under the integrated Tomcat-JBoss binary?
> 
> I've read the docs.  I've reviewed the working sample.  I've tried 
> whatseems to be every concievable permutation of .jcml, .conf, 
> manifest settings
> that I can come up with.  I cannot get the damn thing (my servlet) 
> to see my
> home interface class file.  It throws a ClassNotFoundException 
> every time.
> 
> Offer me a setting.  I'll try it (if I haven't already).  Tell me 
> where to
> put my ejb interface files (in or out of a client.jar, doesn't 
> matter, I've
> tried it).
> 
> Any last words of advice before I give up?  I'd love to hear from 
> someonewho has this working and see the configuration.
> 
> Thanks,
> 
> Bill Pfeiffer
> 
> 
> ___
> 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



Re: [JBoss-user] env-entry JDNI name

2001-04-17 Thread Victor Lan

java:comp/env is the right context.

Where are you doing lookup from?  Make sure your servlet's init() is 
called before you do the lookup.

Victor

- Original Message -
From: Mike Hoolehan <[EMAIL PROTECTED]>
Date: Tuesday, April 17, 2001 1:41 pm
Subject: [JBoss-user] env-entry JDNI name

> I'm attempting to use the  tag in my web.xml descriptor 
> of a j2ee app to define some constants.  Like this:
> 
> 
>Hex code for highlight color
>htmlHighlightColor
>#FF
>java.lang.String
> 
> 
> As the app is deployed, I see this in the log:
> ...
> 2001-04-11 09:39:23 - ContextManager: Adding context Ctx( /mbz-
> test )
> [Auto deploy] Add env-entry htmlHighlightColor  java.lang.String 
> #FF Hex code for highlight color
> ...
> 
> Looks good.. But under what JDNI name is this?  
> java:/comp/env/htmlHighlightColor doesn't work, plain 
> htmlHighlightColor doesn't work, using 
> application.getAttribute("htmlHighlightColor") doesn't work in 
> jsp.  I don't see the entry with the JNDIView mbean...
> 
> I've seen some mention on the mailing list of needing to use jboss-
> web.xml to use the comp/env names, but haven't been able to 
> pinpoint any specific documentation.  
> 
> 
> Running jboss pre 2.1, tomcat 3.2.1
> 
> Mike
> 
> ___
> 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



Re: [JBoss-user] simple question on configuring access todatasource

2001-03-27 Thread Victor Lan

There is no documentation, although it looks like one is intended:

http://www.jboss.org/documentation/jbossxml_howto.html

I figured it out from the petstore patch.

Victor

- Original Message -
From: Donald Ball <[EMAIL PROTECTED]>
Date: Monday, March 26, 2001 8:50 pm
Subject: Re: [JBoss-user] simple question on configuring access to 
datasource

> On Mon, 26 Mar 2001, Victor Lan wrote:
> 
> > Assuming you've setup a pool called PostgresqlTest in your 
> jboss.jcml> file, you need something like this in your jboss.xml:
> >
> >   
> > 
> >   IDGenerator
> >   
> > jdbc/PostgresqlTest
> > PostgresqlTest
> >   
> > 
> >   
> >
> >   
> > 
> >   PostgresqlTest
> >   java:/PostgresqlTest
> > 
> >   
> 
> works like a charm, thanks. i'd be happy to write up a little 
> HOWTO on
> this if you can point me towards the source (xml or sgml?) of the
> documentation.
> 
> - donald
> 
> 
> ___
> 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



Re: [JBoss-user] deploying an .ear

2001-03-27 Thread Victor Lan

Funny nobody responded to my mail on the exact same problem last week :( 
 I guess my subject line was too specific.

Anyway, this seems to be a problem in ver 2.1.  I reverted back to 
2.0_FINAL and it worked.

Give it a try.

Victor

- Original Message -
From: Patrick Buchinger <[EMAIL PROTECTED]>
Date: Tuesday, March 27, 2001 12:14 pm
Subject: Re: [JBoss-user] deploying an .ear

> hi!
> 
> > You can look at tomcat-test.ear for more clarification. If you 
> are still
> > unclear, attach your .ear file and the exceptions (complete 
> details).
> ok, i just took a look at the tomcat-test.ear, and i found out i 
> did 
> everything they did - but still it dosen't work for me. so i 
> deployed 
> the tomcat-test.ear and wanted to run the servlet - guess what?
> 
> 
>  Servlet calling EJB
>  
> Call failed... Exception:
> 
> javax.naming.CommunicationException.  Root exception is 
> java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome
>at java.lang.Throwable.(Throwable.java:96)
>at java.lang.Exception.(Exception.java:44)
>at 
> java.lang.ClassNotFoundException.(ClassNotFoundException.java:71)  
>  at javax.management.loading.MLet.findClass(MLet.java:800)
>at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled 
> Code))at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:212)
>at 
> 
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.j
ava:206)at 
java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream.ja
va:988)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:376)   
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
>at 
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1192) 
>   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)   
> at java.rmi.MarshalledObject.get(MarshalledObject.java:144)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
>at javax.naming.InitialContext.lookup(InitialContext.java:351)
>at 
> org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:62)  
>  at org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:43)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at 
> 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
   at org.apache.tomcat.core.Handler.service(Handler.java:286)
>at 
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
   at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
>at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
   at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
>at 
> 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
>at java.lang.Thread.run(Thread.java:498)
> 
> Call failed... Exception:
> 
> javax.naming.CommunicationException.  Root exception is 
> java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome
>at java.lang.Throwable.(Throwable.java:96)
>at java.lang.Exception.(Exception.java:44)
>at 
> java.lang.ClassNotFoundException.(ClassNotFoundException.java:71)  
>  at javax.management.loading.MLet.findClass(MLet.java:800)
>at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled 
> Code))at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:212)
>at 
> 
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.j
ava:206)at 
java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream.ja
va:988)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:376)   
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
>at 
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1192) 
>   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)   
> at java.rmi.MarshalledObject.get(MarshalledObject.java:144)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
>at javax.naming.InitialContext.lookup(InitialContext.java:351)
>at 
> org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:62)  
>  at org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:44)
>at javax.servlet.http.HttpServlet.service(

Re: [JBoss-user] deploying an .ear

2001-03-27 Thread Victor Lan

Funny nobody responded to my mail on the exact same problem last week :( 
  I guess my subject line was too specific.

Anyway, this seems to be a problem of ver 2.1.  I reverted back to 
2.0_FINAL and it worked.

Victor

- Original Message -
From: Patrick Buchinger <[EMAIL PROTECTED]>
Date: Tuesday, March 27, 2001 12:14 pm
Subject: Re: [JBoss-user] deploying an .ear

> hi!
> 
> > You can look at tomcat-test.ear for more clarification. If you 
> are still
> > unclear, attach your .ear file and the exceptions (complete 
> details).
> ok, i just took a look at the tomcat-test.ear, and i found out i 
> did 
> everything they did - but still it dosen't work for me. so i 
> deployed 
> the tomcat-test.ear and wanted to run the servlet - guess what?
> 
> 
>  Servlet calling EJB
>  
> Call failed... Exception:
> 
> javax.naming.CommunicationException.  Root exception is 
> java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome
>at java.lang.Throwable.(Throwable.java:96)
>at java.lang.Exception.(Exception.java:44)
>at 
> java.lang.ClassNotFoundException.(ClassNotFoundException.java:71)  
>  at javax.management.loading.MLet.findClass(MLet.java:800)
>at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled 
> Code))at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:212)
>at 
> 
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.j
ava:206)at 
java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream.ja
va:988)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:376)   
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
>at 
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1192) 
>   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)   
> at java.rmi.MarshalledObject.get(MarshalledObject.java:144)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
>at javax.naming.InitialContext.lookup(InitialContext.java:351)
>at 
> org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:62)  
>  at org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:43)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at 
> 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) 
   at org.apache.tomcat.core.Handler.service(Handler.java:286)
>at 
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
   at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
>at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
   at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
>at 
> 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
>at java.lang.Thread.run(Thread.java:498)
> 
> Call failed... Exception:
> 
> javax.naming.CommunicationException.  Root exception is 
> java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome
>at java.lang.Throwable.(Throwable.java:96)
>at java.lang.Exception.(Exception.java:44)
>at 
> java.lang.ClassNotFoundException.(ClassNotFoundException.java:71)  
>  at javax.management.loading.MLet.findClass(MLet.java:800)
>at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled 
> Code))at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:212)
>at 
> 
sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.j
ava:206)at 
java.io.ObjectInputStream.inputProxyClassDescriptor(ObjectInputStream.ja
va:988)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:376)   
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
>at 
> java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1192) 
>   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
>at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)   
> at java.rmi.MarshalledObject.get(MarshalledObject.java:144)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
>at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
>at javax.naming.InitialContext.lookup(InitialContext.java:351)
>at 
> org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:62)  
>  at org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:44)
>at javax.servlet.http.HttpServlet.service(HttpServlet.jav

Re: [JBoss-user] Bean lookup from client

2001-03-26 Thread Victor Lan

I apologize if this sounds idiotically obvious, but when you mentioned 
your classpath, you didn't list the jar that contains your remote and 
home classes.  It's a long shot since I'd expect a 
ClassNotFoundException instead if that is indeed the problem.

- Original Message -
From: Tobias Seelinger <[EMAIL PROTECTED]>
Date: Monday, March 26, 2001 6:24 am
Subject: [JBoss-user] Bean lookup from client

> Hi,
> 
> i have deployed some Beans with JBoss pre 2.1 binary and now I am 
> tryingto connect with a client application. The client code looks 
> like the
> examples from the JBoss website:
> 
> InitialContext jndiContext = new InitialContext();
> Object ref  = jndiContext.lookup("Login");
> LoginHome home = (LoginHome)PortableRemoteObject.narrow (ref,
> LoginHome.class);
> 
> But the third line leads to a ClassCastException for LoginHome. A
> System.out.println for ref shows me "LoginHome", so the JNDI lookup
> succeeded. The superclass for ref is java.lang.reflect.Proxy, so I 
> triedto find out which Interfaces this dynamic Proxy is 
> implementing. It
> implements LoginHome and javax.ejb.Handle.
> Now I can cast ref to Handle but I can't cast ref to LoginHome. That's
> very strange...
> 
> My client classpath contains jboss-client.jar and ejb.jar.
> I have no idea what could be wrong.
> 
> 
> Tobias
> 
> ___
> 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



Re: [JBoss-user] simple question on configuring access todatasource

2001-03-26 Thread Victor Lan

Assuming you've setup a pool called PostgresqlTest in your jboss.jcml 
file, you need something like this in your jboss.xml:

  

  IDGenerator
  
jdbc/PostgresqlTest
PostgresqlTest
  

  

  

  PostgresqlTest
  java:/PostgresqlTest

  

- Original Message -
From: Donald Ball <[EMAIL PROTECTED]>
Date: Monday, March 26, 2001 3:56 pm
Subject: [JBoss-user] simple question on configuring access to 
datasource

> hiya. i'm writing a session bean which i'd like to have access to 
> the same
> datasource/connection pool that controls my entity beans. i've got 
> thissection in my ejb-jar.xml file:
> 
>
>  
>Generates IDs for the entity beans
>  
>  IDGenerator
>  com.webslingerZ.news.beans.IDGeneratorHome
>  com.webslingerZ.news.beans.IDGenerator
>  com.webslingerZ.news.beans.IDGeneratorBean class>  Stateless
>  Container
>  
>DataSource for the database
>jdbc/PostgresqlTest
>javax.sql.DataSource
>Container
>  
>
> 
> but i can't figure out to map the JNDI resource named
> java:comp/env/jdbc/PostgresqlTest to the datasource named 
> 'PostgresqlTest'in my jaws.xml file. it would seem that i need to 
> create a jboss.xml file
> for that purpose, but i can't seem to find any documentation on 
> how to do
> so. any clues?
> 
> - donald
> 
> 
> ___
> 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



Re: [JBoss-user] log4j

2001-03-23 Thread Victor Lan

Not sure what you mean by "integrated log4j".  I use log4j in my beans 
and they seem to work in jBoss.

Victor

- Original Message -
From: Doug Ferguson <[EMAIL PROTECTED]>
Date: Friday, March 23, 2001 7:22 pm
Subject: [JBoss-user] log4j

> I've seen somethings in the list about  an integratred log4j
> 
> Does anybody know the details.
> 
> Do beans have access to the logging server or is this just for jBoss
> internals?
> 
> If the log4j won't work for beans, does anybody have a working 
> solutionfor
> EJB logging?
> 
> thanks,
> d.
> 
> 
> ___
> 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] bean lookup failed

2001-03-23 Thread Victor Lan

I'm testing my jBoss + EmbeddedTomcat setup with the tomcat-test.ear 
application (available at the jboss site).

I get the following exception while the servlet is looking up the EJB:

javax.naming.CommunicationException.  Root exception is 
java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome

The stack trace is:
javax.naming.CommunicationException.  Root exception is 
java.lang.ClassNotFoundException: 
org.jboss.test.tomcat.ejb.interfaces.StatelessSessionHome
at javax.management.loading.MLet.findClass(MLet.java:800)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown 
Source)
at java.io.ObjectInputStream.inputProxyClassDescriptor(Unknown 
Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.inputObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at 
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:299)
at 
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
at javax.naming.InitialContext.lookup(Unknown Source)
at 
org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:58)
at 
org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
at java.lang.Thread.run(Unknown Source)

I am guessing that I am missing something with the setup, since I get 
the same exception with my own app that deploys perfectly in another app 
server.

I have verified that the war's manifest.mf has a Class-Path entry 
pointing to the client.jar containing the remote and home classes.  In 
fact, the remote and home classes are also in the WEB-INF/classes of the 
war file (is this redundant?).  Why is the system not finding the home?

What am I missing?

TIA

Victor


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