Hi Federico,
This is the changes I made:
@Override
public void createDestination(Class<? extends Destination> type, String jndiSuffix) throws Exception
{
String methodName;
String destinationContext;
if (type == Topic.class)
{
destinationContext = "topic";
methodName = "deployTopic";
}
else if (type == Queue.class)
{
destinationContext = "queue";
methodName = "deployQueue";
}
else
{
// type was not a Topic or Queue, bad user
throw new IllegalArgumentException
("Expected javax.jms.Queue or javax.jms.Topic: " + type);
}
String jndiName = (new StringBuilder()).append(destinationContext).append("/").append(jndiSuffix).toString();
ObjectName destinationManagerName = new ObjectName("jboss.messaging:service=ServerPeer");
KernelAbstraction kernel = KernelAbstractionFactory.getInstance();
// invoke the server to create the destination
Object result = kernel.invoke(destinationManagerName,
methodName,
new Object[]{jndiSuffix, jndiName},
new String[]{"java.lang.String", "java.lang.String"});
}
Rebuild the project and drop the jar into the depoly/ejb3.deployer folder. Hope this helps you...
Regards,
Martin