• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Help EJB3  RSS feed

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all!

I need some help with the following:

Web Server - Jboss 5.1.0 GA
IDE - eclipse

I created a EJB project using eclipse and the following files:

ejb.server.HelloWorld.HelloWorldBeanRemote


ejb.server.HelloWorld.HelloWorldBeanLocal



ejb.server.HelloWorld.HelloWorldBean



and the client



I execute the project from Eclipse and my ejb is deployed as I get the message:
11:27:41,999 INFO [EJBContainer] STARTED EJB: ejb.server.HelloWorld.HelloWorldBean ejbName: HelloWorldBean
11:27:42,018 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

HelloWorldBean/remote - EJB3.x Default Remote Business Interface
HelloWorldBean/remote-ejb.server.HelloWorld.HelloWorldBeanRemote - EJB3.x Remote Business Interface
HelloWorldBean/local - EJB3.x Default Local Business Interface
HelloWorldBean/local-ejb.server.HelloWorld.HelloWorldBeanLocal - EJB3.x Local Business Interface




When I run the client as a JAVA APPLICATION I get the output:
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]
Proxy to jboss.j2ee:jar=EJB.jar,name=HelloWorldBean,service=EJB3 implementing [interface ejb.server.HelloWorld.HelloWorldBeanRemote]

What I am doing wrong that I dont get the object I want from the Container?

 
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The output looks right to me. Were you expecting something else?
 
Gunnar Maluf
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:The output looks right to me. Were you expecting something else?



Since I am starting studying EJB3 now....so I didn't know what to expect.
Although I was expecting an Object of my bean type, someone in another forum explained to me that EJB returns a proxy for the object.

Now I would like to know how to use a local interface, could you please help me?
Is it possible (and a good practice) to use a local interface in the client?

best regards
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!