@Override public byte getMethodTransactionType(String methodName, Class[] params, InvocationType iface) { // A JMS MDB may only ever have one method if (isJMSMessagingType()) return getMethodTransactionType(); else return getMethodTransactionType(methodName, params); }
/** * Get the destination link * * @return the destination link */ public String getDestinationLink() { return getDelegate().getMessageDestinationLink(); }
checkActivationConfig("destination", metaData.getDestinationJndiName()); checkActivationConfig("destinationType", metaData.getDestinationType()); checkActivationConfig("messageSelector", metaData.getMessageSelector()); if (Session.DUPS_OK_ACKNOWLEDGE == metaData.getAcknowledgeMode()) checkActivationConfig("acknowledgeMode", "DUPS_OK_ACKNOWLEDGE"); else checkActivationConfig("acknowledgeMode", "AUTO_ACKNOWLEDGE"); if (MessageDrivenMetaData.DURABLE_SUBSCRIPTION == metaData.getSubscriptionDurability()) checkActivationConfig("subscriptionDurability", "Durable"); else checkActivationConfig("subscriptionDurability", "NonDurable"); checkActivationConfig("clientId", metaData.getClientId()); checkActivationConfig("subscriptionName", metaData.getSubscriptionId()); checkActivationConfig("user", metaData.getUser()); checkActivationConfig("password", metaData.getPasswd()); Element proxyConfig = invokerMetaData.getProxyFactoryConfig(); checkActivationConfig("maxMessages", MetaData.getOptionalChildContent(proxyConfig, "MaxMessages"));
if (getMethodTransactionType() == TX_REQUIRED) String ack = getDelegate().getAcknowledgeMode(); if (ack == null || ack.equalsIgnoreCase("Auto-acknowledge") || ack.equalsIgnoreCase("AUTO_ACKNOWLEDGE")) return AUTO_ACKNOWLEDGE_MODE;
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
/** * Check MDB methods TX type, is cached here * * @return the transaction type */ public byte getMethodTransactionType() { if (methodTransactionType == TX_UNSET) { Class[] sig = { Message.class }; methodTransactionType = getMethodTransactionType("onMessage", sig); } return methodTransactionType; }
/** * Create a new BeanMetaData. * * @param delegate the delegate * @return the metadata * @throws IllegalArgumentException for a null delegate or an unknown delegate */ public static BeanMetaData create(ApplicationMetaData app, JBossEnterpriseBeanMetaData delegate) { if (delegate == null) throw new IllegalArgumentException("Null delegate"); if (delegate.isSession()) return new SessionMetaData(app, delegate); if (delegate.isMessageDriven()) return new MessageDrivenMetaData(app, delegate); if (delegate.isEntity()) return new EntityMetaData(app, delegate); throw new IllegalArgumentException("Unknown delegate: " + delegate); }
/** * Check MDB methods TX type, is cached here * * @param methodName the method name * @param signature the signature * @return the transaction type */ public byte getMethodTransactionType(String methodName, Class[] signature) { if (isContainerManagedTx()) { if (super.getMethodTransactionType(methodName, signature, null) == TX_NOT_SUPPORTED) return TX_NOT_SUPPORTED; else return TX_REQUIRED; } else return TX_UNKNOWN; }
if (getMethodTransactionType() == TX_REQUIRED) String ack = getDelegate().getAcknowledgeMode(); if (ack == null || ack.equalsIgnoreCase("Auto-acknowledge") || ack.equalsIgnoreCase("AUTO_ACKNOWLEDGE")) return AUTO_ACKNOWLEDGE_MODE;
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
/** * Check MDB methods TX type, is cached here * * @return the transaction type */ public byte getMethodTransactionType() { if (methodTransactionType == TX_UNSET) { Class[] sig = { Message.class }; methodTransactionType = getMethodTransactionType("onMessage", sig); } return methodTransactionType; }
/** * Create a new BeanMetaData. * * @param delegate the delegate * @return the metadata * @throws IllegalArgumentException for a null delegate or an unknown delegate */ public static BeanMetaData create(ApplicationMetaData app, JBossEnterpriseBeanMetaData delegate) { if (delegate == null) throw new IllegalArgumentException("Null delegate"); if (delegate.isSession()) return new SessionMetaData(app, delegate); if (delegate.isMessageDriven()) return new MessageDrivenMetaData(app, delegate); if (delegate.isEntity()) return new EntityMetaData(app, delegate); throw new IllegalArgumentException("Unknown delegate: " + delegate); }
/** * Check MDB methods TX type, is cached here * * @param methodName the method name * @param signature the signature * @return the transaction type */ public byte getMethodTransactionType(String methodName, Class[] signature) { if (isContainerManagedTx()) { if (super.getMethodTransactionType(methodName, signature, null) == TX_NOT_SUPPORTED) return TX_NOT_SUPPORTED; else return TX_REQUIRED; } else return TX_UNKNOWN; }
/** * Get the user * * @return the user */ public String getUser() { return getDelegate().getMdbUser(); }
@Override public byte getMethodTransactionType(String methodName, Class[] params, InvocationType iface) { // A JMS MDB may only ever have one method if (isJMSMessagingType()) return getMethodTransactionType(); else return getMethodTransactionType(methodName, params); }
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
/** Helper to check if the tx type is TX_REQUIRED. */ private boolean isTxRequired() { MessageDrivenMetaData md = (MessageDrivenMetaData)con.getBeanMetaData(); return md.getMethodTransactionType() == MetaData.TX_REQUIRED; } }
/** * Get the destination link * * @return the destination link */ public String getDestinationLink() { return getDelegate().getMessageDestinationLink(); }
public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException { boolean result = false; int transType = metaData.getMethodTransactionType(method.getName(), method.getParameterTypes(), InvocationType.LOCAL); if (transType == MetaData.TX_REQUIRED) result = true; if (trace) log.trace("isDeliveryTransacted " + container.getBeanMetaData().getContainerObjectNameJndiName() + " method=" + method + " result=" + result); return result; }
/** * Get the user * * @return the user */ public String getUser() { return getDelegate().getMdbUser(); }