aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Look up EJB 3.0 Session Bean in Remote Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Look up EJB 3.0 Session Bean in Remote Client" Watch "Look up EJB 3.0 Session Bean in Remote Client" New topic
Author

Look up EJB 3.0 Session Bean in Remote Client

Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 311

PS:
NOTE: Changed to JBoss instead of Oracle, see the reply added below.


Hi, I love the concepts of EJB 3.0, but looking up an EJB 3.0 remote bean still fails.

I have collected all solutions and discussions from JavaRanch forum and from the rest of the Internet - no chance.

Some of you tried with JBoss application server, but did anybody ever successfully remotely connect to a Oracle AS 10g EJB 3.0 bean?

For instance: What are the
- name for the INITIAL_CONTEXT_FACTORY to be passed to the InitialContext
- name of Oracle's jar or jars providing the INITIAL_CONTEXT_FACTORY behind the PROVIDER_URL ?
- name of Oracle's class providing the INITIAL_CONTEXT_FACTORY behind the PROVIDER_URL ?

See "env.setProperty( Context.INITIAL_CONTEXT_FACTORY, "???");" below.

As soon as it works I will post the solution to all.

In my code below there is
- a simple business interface HelloWorld
- an extending interface LocalHelloWorld
- an extending interface RemoteHelloWorld
- an implementing HelloWorldBean
- a client that tries to lookup the EJB 3.0 bean end to remotely call on it

Lookup fails.

If anybody of you could tell me the missing points ...
Many thanks in advance
Thomas

====

Server-side:

====

Infrastructure:
- AppServer: Oracle AS 10g 10.1.3
- hostname: thomas7
- host ip: 192.168.178.7
- app server does not act as a DHCP server
- T-DSL router on 192.168.178.1 acts as DHCP server for the clients
- Java: j2sdk1.4.2_06
- Win2000
- no domain name but in workgroup

Eclipse Configuration:
* Eclipse > Project > Properties > JavaBuildPath > Libraries > AddExteralJars:
* C:\oracle10g\as\j2ee\home\lib\ejb30.jar
- MainClass: com.firma.app.businessimpl.HelloWorldBean
- Run > Run... > Arguments > VMArguments: -enableassertions



====


====



====



==== ==== ==== ====

On the client notebook:
- Client's IP addr from T-DSL router (=DHCP server) noted above.
- Win XP
- no domain name but in workgroup
- Java: j2sdk1.4.2_06
- in ...\etc\hosts: 192.168.178.7 thomas7

Eclipse Configuration:
* Eclipse > Project > Properties > JavaBuildPath > Libraries > AddExteralJars:
* C:\oracle10g\as\j2ee\home\lib\ejb30.jar
* HelloWorldInterfaces.jar
* jre1.5.0_05
- MainClass: com.firma.client.business.HelloWorldClient
- Run > Run... > Arguments > VMArguments:
-Djava.naming.provider.url=http://192.168.178.7:1099
-enableassertions

====

====

Run ==> "lookup( java:comp/env/ejb/com.firma.common.business.RemoteHelloWorld) FAILED"
[ March 19, 2006: Message edited by: Thomas Taeger ]

www.classic-and-class.com - www.evalulearn.com
Interfaces are the glue of OO.
Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 311
... ok, ok, nobody using Oracle AS yet for EJB 3.0.
So could you please provide me with the values for JBoss?:
Originally posted by Thomas Taeger:
For instance: What are the
- name for the INITIAL_CONTEXT_FACTORY to be passed to the InitialContext
- name of [JBoss] jar or jars providing the INITIAL_CONTEXT_FACTORY behind the PROVIDER_URL ?
- name of [JBoss]'s class providing the INITIAL_CONTEXT_FACTORY behind the PROVIDER_URL ?

See "env.setProperty( Context.INITIAL_CONTEXT_FACTORY, "???");" within the code please.

Many thanks in advance
Thomas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Look up EJB 3.0 Session Bean in Remote Client