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 void
close()
Does endpoint deactivation with the resource adapter.jakarta.resource.spi.endpoint.MessageEndpoint
createEndpoint(XAResource xa)
Creates a MessageEndpoint.jakarta.resource.spi.endpoint.MessageEndpoint
createEndpoint(XAResource xaResource, long timeout)
String
getActivationName()
Class<?>
getEndpointClass()
boolean
isDeliveryTransacted(Method method)
Checks whether the message delivery is transacted for the method.void
setup(MessageBeanProtocolManager messageBeanPM)
Gets executed as part of message bean deployment.void
start()
Marks the completion of MDB deployment.String
toString()
-
-
-
Constructor Detail
-
ConnectorMessageBeanClient
public ConnectorMessageBeanClient(EjbMessageBeanDescriptor descriptor)
Creates an instance ofConnectorMessageBeanClient
- Parameters:
descriptor
-EjbMessageBeanDescriptor
object.
-
-
Method Detail
-
setup
public void setup(MessageBeanProtocolManager messageBeanPM) throws Exception
Gets executed as part of message bean deployment. Creates theActivationSpec
javabean 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:
setup
in interfaceMessageBeanClient
- Parameters:
messageBeanPM
-MessageBeanProtocolManager
object.- Throws:
Exception
-
start
public void start() throws Exception
Marks the completion of MDB deployment. Unblocks the createEndPoint method call.- Specified by:
start
in interfaceMessageBeanClient
- Throws:
Exception
-
close
public void close()
Does endpoint deactivation with the resource adapter. Also remove stheMessageEndpointFactoryInfo
from house keeping.- Specified by:
close
in 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:
createEndpoint
in interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
- Returns:
MessageEndpoint
object.- Throws:
jakarta.resource.spi.UnavailableException
-
isDeliveryTransacted
public boolean isDeliveryTransacted(Method method)
Checks whether the message delivery is transacted for the method.- Specified by:
isDeliveryTransacted
in 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:
createEndpoint
in interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
- Throws:
jakarta.resource.spi.UnavailableException
-
getActivationName
public String getActivationName()
- Specified by:
getActivationName
in interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
-
getEndpointClass
public Class<?> getEndpointClass()
- Specified by:
getEndpointClass
in interfacejakarta.resource.spi.endpoint.MessageEndpointFactory
-
-