Class ConnectorMessageBeanClient
- java.lang.Object
-
- com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient
-
- All Implemented Interfaces:
jakarta.resource.spi.endpoint.MessageEndpointFactory,MessageBeanClient
public final class ConnectorMessageBeanClient extends Object implements MessageBeanClient, jakarta.resource.spi.endpoint.MessageEndpointFactory
Main helper implementation for message-beans associated with a queue. Uses connection consumer for concurrent message delivery.- Author:
- Qingqing Ouyang
-
-
Constructor Summary
Constructors Constructor Description ConnectorMessageBeanClient(EjbMessageBeanDescriptor descriptor)Creates an instance ofConnectorMessageBeanClient
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Does endpoint deactivation with the resource adapter.jakarta.resource.spi.endpoint.MessageEndpointcreateEndpoint(XAResource xa)Creates a MessageEndpoint.jakarta.resource.spi.endpoint.MessageEndpointcreateEndpoint(XAResource xaResource, long timeout)StringgetActivationName()Class<?>getEndpointClass()booleanisDeliveryTransacted(Method method)Checks whether the message delivery is transacted for the method.voidsetup(MessageBeanProtocolManager messageBeanPM)Gets executed as part of message bean deployment.voidstart()Marks the completion of MDB deployment.StringtoString()
-
-
-
Constructor Detail
-
ConnectorMessageBeanClient
public ConnectorMessageBeanClient(EjbMessageBeanDescriptor descriptor)
Creates an instance ofConnectorMessageBeanClient- Parameters:
descriptor-EjbMessageBeanDescriptorobject.
-
-
Method Detail
-
setup
public void setup(MessageBeanProtocolManager messageBeanPM) throws Exception
Gets executed as part of message bean deployment. Creates theActivationSpecjavabean and does endpointfactory activation with the resource adapter. This code also converts all J2EE 1.3 MDB properties to MQ resource adapter activation spec properties, if user doesnt specifies resource adapter module name in sun-ejb-jar.xml of the MDB. This is done usingcom.sun.enterprise.connector.system.ActiveJmsResourceAdapter- Specified by:
setupin interfaceMessageBeanClient- Parameters:
messageBeanPM-MessageBeanProtocolManagerobject.- Throws:
Exception
-
start
public void start() throws ExceptionMarks the completion of MDB deployment. Unblocks the createEndPoint method call.- Specified by:
startin interfaceMessageBeanClient- Throws:
Exception
-
close
public void close()
Does endpoint deactivation with the resource adapter. Also remove stheMessageEndpointFactoryInfofrom house keeping.- Specified by:
closein interfaceMessageBeanClient
-
createEndpoint
public jakarta.resource.spi.endpoint.MessageEndpoint createEndpoint(XAResource xa) throws jakarta.resource.spi.UnavailableException
Creates a MessageEndpoint. This method gets blocked either until start() is called or until one minute. This is the time for completion of MDB deployment. Internally this method creates a message bean listener from the MDB container and a proxy object fo delivering messages.- Specified by:
createEndpointin interfacejakarta.resource.spi.endpoint.MessageEndpointFactory- Returns:
MessageEndpointobject.- Throws:
jakarta.resource.spi.UnavailableException
-
isDeliveryTransacted
public boolean isDeliveryTransacted(Method method)
Checks whether the message delivery is transacted for the method.- Specified by:
isDeliveryTransactedin interfacejakarta.resource.spi.endpoint.MessageEndpointFactory- Returns:
- true or false.
-
toString
public String toString()
-
createEndpoint
public jakarta.resource.spi.endpoint.MessageEndpoint createEndpoint(XAResource xaResource, long timeout) throws jakarta.resource.spi.UnavailableException
- Specified by:
createEndpointin interfacejakarta.resource.spi.endpoint.MessageEndpointFactory- Throws:
jakarta.resource.spi.UnavailableException
-
getActivationName
public String getActivationName()
- Specified by:
getActivationNamein interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
-
getEndpointClass
public Class<?> getEndpointClass()
- Specified by:
getEndpointClassin interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
-
-