wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5)" Watch "Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5)" New topic
Author

Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5)

Pradeep Bhat
Greenhorn

Joined: Jan 12, 2008
Posts: 29
I am trying to deploy 2 stateless beans here.

One is PlaceBidBean
Other is DepInject (which has a dependency injection of PlaceBidBean)


The source code is as follows









I also tried it with simply @EJB instead of @EJB(beanName="ejb3inaction.example.buslogic.PlaceBidBean")
When i am deploying it gives me the following error :

12:09:11,158 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.j2ee:name=ejb3inaction.example.buslogic.PlaceBidBean,service=EJB3,* **")

DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:jar=DepInject.jar,name=DepInjectImpl,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.j2ee:name=ejb3inaction.example.buslogic.PlaceBidBean,service=EJB3,* **





I also placed the classes related to PladeBidBean in C:\jboss-5.0.1.GA\server\default\lib .
What could be the problem here.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9913
    
158

@EJB(beanName="ejb3inaction.example.buslogic.PlaceBidBean")


The beanName is the name of the bean. So it should be:



[My Blog] [JavaRanch Journal]
Pradeep Bhat
Greenhorn

Joined: Jan 12, 2008
Posts: 29
Still not working....but I did notice the following warning while deploying

21:41:07,328 WARN [MappedReferenceMetaDataResolverDeployer] Unresolved references exist in JBossMetaData:[#DepInjectImpl:AnnotatedEJBReferenceMetaData{name=dep.DepInjectImpl/placebid,ejb-ref-type=null,link=PlaceBidBean,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface ejb3inaction.example.buslogic.PlaceBid}]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dependency injection using Ejb3 in jboss-5.0.1.GA (and jdk 5)
 
Similar Threads
hoq to make EJB interface using Netbeans
Business method names must not start with "ejb".
Multiple postconstruct and predestroy methods.
Need Help while running stateless session bean with Servelet bean client
A session bean class must not have a superclass that is itself a session bean class.