Hi, I am new to
Java EE.
I am trying to gain an understanding of the subject as a quite experienced java applications developer.
I am running through various tutorials - some using Glassfish 2.11 / Netbeans 6.8, and some on Weblogic 11g / jdeveloper 11
If I could understand the reason why every example I try produces a javax.naming.NameNotFoundException I would feel that I am not totally wasting my time.
Using Annotations:
Am I correct in thinking that the annotation within the
EJB is the code that writes the entry inside JNDI?
I cannot seem to get a definitive answer for this.
I have a very simple messaging bean as follows...
*****************************************
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
@MessageDriven(mappedName = "weblogic.wsee.DefaultQueue")
public class MessageDrivenEJBBean implements MessageListener
{
public void onMessage(Message message)
{
try
{
System.out.println(message.getStringProperty("name"));
}
catch (JMSException e)
{
System.out.println("JMSException "+e);
e.printStackTrace();
}
}
}
*****************************************
The functionality of the onMessage Method is not very useful - its just designed to do Something.
When I try to deploy it to the server, I get the following...
<BEA-010061> <The Message-Driven EJB: MessageDrivenEJBBean is unable to connect to the JMS destination: weblogic.wsee.DefaultQueue. The Error was:
javax.naming.NameNotFoundException: Unable to resolve 'weblogic.wsee.DefaultQueue'. Resolved 'weblogic.wsee'; remaining name 'DefaultQueue'
- the context weblogic.wsee does exist in the jndi tree - but weblogic.wsee.DefaultQueue does not.
Is this annotation supposed to create the DefaultQueue, or do I need to do it manually?
can anybody please point me in the right direction?
Mark
>