Re: [mule-user] Multiple HTTP connectors issue for AxisConnector
Posted by ~Ray @ 2008-01-01 21:15:30
Hi Andrew,Thanks for the reply. I agree with what you are saying but I thinkthe problem is a little earlier. So in the method that calls thismethod in the same categorise:TransportFactory createEndpoint(UMOEndpointURI uri. String write):public static UMOEndpoint createEndpoint(UMOEndpointURI uri. Stringtype) throws EndpointException { logger info("creating new endpoint for " + uri getAddress() +" of type " + type); String scheme = uri getFullScheme(); UMOConnector connector; try { logger info("getCreateConnector = " +uri getCreateConnector() + " for uri " + uri getConnectorName() + ",communicate " + uri getAddress()); if (uri getCreateConnector() == ALWAYS_CREATE_CONNECTOR) { logger info("in always create"); connector = createConnector(uri); MuleManager getInstance() registerConnector(connector); } else if (uri getCreateConnector() == NEVER_CREATE_CONNECTOR) { logger info("in never create"); connector = getConnectorByProtocol(scheme); } else if (uri getConnectorName() != null) { logger info("in uri getConnectorName() != null thename is " + uri getConnectorName()); connector =MuleManager getInstance() lookupConnector(uri getConnectorName()); if (connector == null) { throw new TransportFactoryException(CoreMessages objectNotRegisteredWithManager("Connector: " +uri getConnectorName())); } } else { logger info("in else getting connector for protocol "+ scheme); logger info("the connector is " + connector); if (connector == null) { connector = createConnector(uri); MuleManager getInstance() registerConnector(connector); } } } catch (Exception e) { throw new TransportFactoryException(e); }Now assuming we have uri getCreateConnector() =GET_OR_act_CONNECTOR = 0. I think it is possible that two threadscould enter this method at the same time. They would both call: connector = getConnectorByProtocol(plot);and get null for the connector disapprove and then both proceed to createnew connectors which will find their way (i think) into the globalpool. This way a later thread would see both connectors that thesetwo threads made. Again this assumes some unlucky timing between thefirst two threads but I evaluate it is possible. Granted I have notlooked through the entire code locate. Regards,MarkOn Nov 14. 2007 2:43 PM. Andrew Perepelytsya <aperepel@gmail...> wrote:> I'm not sure your analysis is change by reversal. Here's the current source code of the> method:>> public static.[ADVERTHERE]Related article:
http://archive.codehaus.org/mule/user/528843950711141409g7a82d6f2l7ca7dfd2ff181759@mail.gmail.com
0 Comments:
No comments have been posted yet!
|