Manuel Jimenez

Greenhorn
+ Follow
since Jun 13, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manuel Jimenez

Hi Slobodan,

Yesterday i got the SCBCD certification, and i used principally the book "Enterprise JavaBeans 3.0, Fifth Edition by Richard Monson-Haefel, Bill Burke". This is a really good book. I have some years of experience in ejb3, but this is a good book for begin and to know almost every objectives in the exam and practice (have excercises with source code).

Good luck!

Originally posted by Jaikiran Pai:
Sergio,

I guess, you are using JBoss-4.x which does not support EJB injection in servlets or application clients. The later version JBoss-5.x (which is still in Beta) supports injecting the EJB in servlets and application clients.



Hi i have a similar problem. Im using JBoss-4.2.2, and i have been tried to make an @EJB injection in a Message Driven Bean, but i get a runtime error in deploy time.

I get this error: "java.lang.RuntimeException: Failed to populate ENC: env/MyMDBean/MySessionBean global jndi name was null"

the code is someting like that:
-------------------------------------------------------------------
@Stateless(name = "MySessionBean")
public class MySessionBean implements IMySessionBeanRemote {

public void doSometing(String a) {
try {
System.out.println("in doSometing!! :"+a);
}cath(Exception e){
e.printStackTrace();
}

}
-------------------------------------------------------------------
@MessageDriven(name="MyMDBean", activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/TestQueue")

})
public class MyMDBean implements MessageListener {

@Resource
private MessageDrivenContext context;

@EJB(beanName = "MySessionBean")
private MySessionBean myBean;

public void onMessage(Message message) {
try {
...
} catch (Exception t) {
...
}
}
}

Any ideas?, Jboss 4.2.2 supports @EJB injection?

Thanks for your help.
[ July 04, 2008: Message edited by: Manuel Jimenez ]