As far as I know, no, you cannot do this.
Since the association of the destination (which is the string) and the bean (which is the class) is done once during deployment, you cannot programmatically change the destination.
Maybe there is a hack for re-binding; I mean forcing the container to issue MDB, then changing the destination and reinitializing (going through dependency injection, then building steps, etc.), but I doubt that application servers will allow it.
Excerpt from JSR-318 (EJB 3.1 Specification);
5.4.17 Association of message-processed Bean with Destination or Endpoint
A message-driven bean is associated with an endpoint or endpoint when the bean is deployed in a container. Deployer's responsibility to associate a message-driven bean with an endpoint or endpoint.
5.4.17.1 JMS Message-Driven Beans
The bean JMS message is associated with a JMS Destination (Queue or Topic) when the bean is deployed in the container. Deployer's responsibility to bind a message-driven bean using a queue or topic.
source share