List Info

Thread: howto: message-destination-ref to assign factory and queue to Session bean?




howto: message-destination-ref to assign factory and queue to Session bean?
user name
2007-11-06 18:43:27
How would I use the sun-ejb-jar.xml to assign a factory and
message queue to a publisher Session bean?

[b]I've tried but am getting this errors:[/b]
This bean [FabToHubSenderSBean] has no resource reference by
the name of [xxx]
"DPL8007: Invalid Deployment Descriptors element
jndi-name value jms/FabSan01Factory"
This ejb [FabToHubSenderSBean] has no message destination
reference by the name of [yyy]
"DPL8007: Invalid Deployment Descriptors element
jndi-name value jms/FabSan01ToHubQueue"
...
NAM0008 : Invalid Destination: yyy for
java:comp/env/com.ilmn.dam.fab.jms.FabToHubSenderSBean/queue

EJB5090: Exception in creating EJB container
[javax.naming.NamingException [Root exception is
javax.naming.NameNotFoundException: yyy not found]]


[b]In my bean:[/b]
Stateless
Local({FabToHubSenderLocal.class})
Remote({FabToHubSenderRemote.class})
public class FabToHubSenderSBean implements
FabToHubSenderLocal, FabToHubSenderRemote
{
    Resource(mappedName = "zzz")
    private ConnectionFactory connectionFactory;

    Resource(mappedName = "yyy")
    private Queue queue;


[b]In my sun-ejb-jar.xml:[/b]

    <ejb>
      <ejb-name>FabToHubSenderSBean</ejb-name>

      <resource-ref>
        <res-ref-name>xxx</res-ref-name>
       
<jndi-name>jms/FabSan01Factory</jndi-name>
      </resource-ref>

      <message-destination-ref>
       
<message-destination-ref-name>yyy</message-destinat
ion-ref-name>
       
<jndi-name>jms/FabSan01ToHubQueue</jndi-name>
      </message-destination-ref>      

    </ejb>
[Message sent by forum member 'frenchdrip' (frenchdrip)]

http://forums.java.net/jive/thread.jspa?messageID=244196


------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribeglassfish.dev.java.net
For additional commands, e-mail: users-helpglassfish.dev.java.net


Re: howto: message-destination-ref to assign factory and queue to Session b
user name
2007-11-06 20:30:40
At first glance, there is some misunderstanding of
mappedName attribute in Resource annotations. 
mappedName is the global jndi-name of your resource, the
same as the resource <jndi-name> in your
sun-ejb-jar.xml.  mappedName is not the resource reference
name.

So you don't really need to have these resource elements in
sun-ejb-jar.xml.  Try removing sun-ejb-jar.xml, if it
doesn't contain anything else.

-cheng
[Message sent by forum member 'cf126330' (cf126330)]

http://forums.java.net/jive/thread.jspa?messageID=244217


------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribeglassfish.dev.java.net
For additional commands, e-mail: users-helpglassfish.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )