activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Pfort (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQCPP-346) No UTF8 conversation in OpenWire strings
Date Fri, 21 Jan 2011 14:25:45 GMT

    [ https://issues.apache.org/jira/browse/AMQCPP-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984745#action_12984745
] 

Peter Pfort commented on AMQCPP-346:
------------------------------------

Try 

int _tmain(int argc, _TCHAR* argv[])
{
   activemq::library::ActiveMQCPP::initializeLibrary();

   // Create a ConnectionFactory
   ConnectionFactory* connectionFactory =
      ConnectionFactory::createCMSConnectionFactory("tcp://xxxxx:61616?wireFormat=openwire&wireFormat.MaxInactivityDuration=120000");

   // Create a Connection
   Connection * connection = connectionFactory->createConnection("default", "", "yyyyy");
   delete connectionFactory;
   //connection->setClientId(clientId);
   connection->start();

   // Create a Session
   Session * session = connection->createSession( Session::AUTO_ACKNOWLEDGE);

   Topic *t = session->createTopic( "MYTOPIC" );
   MessageConsumer * consumer = session->createDurableConsumer( t, "xxxxx", "äUserName
= 'Germanä'");

	return 0;
}


> No UTF8 conversation in OpenWire strings
> ----------------------------------------
>
>                 Key: AMQCPP-346
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-346
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4
>         Environment: Windows XP/VISTA/7
>            Reporter: Peter Pfort
>            Assignee: Timothy Bish
>
> Hello,
> I have found a bug in the implementation of the OpenWire protocol. When you have non
ascii character i.e. in the selector of a topic consumer, then the program hangs in createConsumer.
> The problem is in the class BaseDataStreamMarshaller. In BaseDataStreamMarshaller::tightMarshalString1()
thinks, the string will be converted to UTF8, but BaseDataStreamMarshaller::tightMarshalString2()
write out the string with dataOut->writeChars( value );
> I have changed BaseDataStreamMarshaller::tightMarshalString2() to dataOut->writeUTF(
value ); and everything works fine.
> Please correct it in the source.
> Best regards

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message