Hm, this was not a nice one, and I am totally to blame. Looking into my
old EJB 2.0 spec from june 2000 I see it was optional then and still is.
Its only an "advice to the deployer". That is probably good if message
driven beans are to be used with something else than JMS, but it is NOT
god with JMS.

Why?

Well, I can not think of any other way of actually getting to know what
kind of destination to use.

Here is why:

If no message-driven-destination  is used there is no where in the
ejb-jar that one may deduce what cind of JMS destination use.

Well, then we have jboss.xml.

Here we have a couple of possibilities.

1. The JNDI name for the destination is specifyed. For JBossMQ we now
   that topics begins with "topic/" and queues with "queue/".

There is thow problems with that approach:

a) We make the MDB even more non portable to another JMS provider, since
there is no guarante they use the same naming convention.

b) Since automatic creation of destinations have been added if jboss.xml
does not exist or the given destination in jboss.xml does not exist. In
this case there is no destination name to guess from. And guess what.
There is actually nothing to guess from.

2. Take the destination name, look it up and try to cast it to either a
   Topic or a Queue. 

Problems:

a) With JBossMQ this would probably work, but there is actually nothing
that stops an implementor of these classes to implement both the Topic
and Queue interfaces.

b) Same problem as in b above - there is no requirement any more that
the destination jndi is given in jboss.xml.

So, pleas help me here. How should we interprete this "advice to
deployer"?

The only way I can understand it is that a default destination type then
has to be given. This could either be activated directly when the meta
data handling discovers that message-driven-destination is missing, or
after both step 1 and 2 has been tested.

Any advice here?

//Peter



On 23 Jul, [EMAIL PROTECTED] wrote:
> Bugs item #443893, was opened at 2001-07-23 12:18
> You can respond by visiting: 
> http://sourceforge.net/tracker/?func=detail&atid=376685&aid=443893&group_id=22866
> 
> Category: JBossServer
> Group: v2.5 Rabbit Hole (unstable)
> Status: Open
> Resolution: None
> Priority: 5
> Submitted By: Nobody/Anonymous (nobody)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Message-driven-destination is optional
> 
> Initial Comment:
> The message-driven-destination is optional in 
> ejb-jar_2_0.dtd, but required by JBoss
> 
> [AutoDeployer] Deployment 
> failed:file:/CVS/jboss/jboss/dist/deploy/server.jar
> org.jboss.deployment.J2eeDeploymentException: Error 
> while starting server.jar: Could not deploy 
> file:/linux/b/CVS/jboss/jboss/dist/tmp/deploy/Default/server.jar, 
> Cause: org.jboss.ejb.DeploymentException: Could not 
> deploy 
> file:/CVS/jboss/jboss/dist/tmp/deploy/Default/server.jar, 
> Cause: org.jboss.ejb.DeploymentException: Error in 
> ejb-jar.xml for Message Driven Bean MYM: expected one 
> message-driven-destination tag
>         at 
> org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:513)
>         at 
> org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:466)
>         at 
> org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:209)
>         at java.lang.reflect.Method.invoke(Native 
> Method)
>         at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>         at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>         at 
> org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:381)
>         at 
> org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:220)
>         at java.lang.Thread.run(Thread.java:484)
> 
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting: 
> http://sourceforge.net/tracker/?func=detail&atid=376685&aid=443893&group_id=22866
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development

-- 
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
Systems Architect        WWW: http://www.tim.se
Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
------------------------------------------------------------


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to