You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Postol <ft...@centrum.cz> on 2008/11/19 02:19:29 UTC
How to create .NET dll of ActiveMQ with IKVM
Hi all,
i want to ask if there is someone, who successfully converted ActiveMQ to
.NET libraries with IKVM, so he is able to use all functionality of ActiveMQ
from C#. I know that there is NMS, but not all stuff is supported there, so
i hope there will be someone, who tried it and was successfull with
conversion.
I have just tried to convert it, but received a lot of exceptions about
missing classes and do not know the reason and how to resolve it...
Can someone post step by step instructions how to make the conversion?
Any help will be appreciated.
Thanks in advance.
Postol
--
View this message in context: http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20572060.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Jim Gomes <e....@gmail.com>.
As an update to this item, the latest version of NMS 1.1 has the ability to
programmatically delete destinations (queues and topics).
On Tue, Nov 25, 2008 at 2:28 PM, Jim Gomes <e....@gmail.com> wrote:
> You are welcome to add those missing features as enhancement requests
> in the AMQNET JIRA database so they get added to a future version of
> NMS. The NMS client is coming along nicely. If you have suggestions
> on how to make it work better, they would be appreciated.
>
> Best,
> Jim
>
> On 11/22/08, Postol <ft...@centrum.cz> wrote:
> >
> > Hello Jim,
> >
> > the most important feature which I am missing is deleting queues and
> topics
> > programatically. I need it in my case scenario, where I am using a
> > Client-Server architecture and each client creates a queue (for requests)
> > and temporary queue (for responses) when connecting to Server. It is used
> > for request-response communication and I need to delete the queue when
> > Client is closed. Can not do it manually via JMX. Also need to delete
> > durable subscribers (or virtual topic queues - btw. this excellent
> feature
> > does not work now:( - will post to forum after this one). I have read
> that
> > it is possible via JMXConnectorFactory.
> >
> > And i wanna try it also because some people mentioned, that the
> performance
> > is better.
> >
> >
> >
> > semog wrote:
> >>
> >> Hi Postol,
> >>
> >> I don't know of any attempts at getting the ActiveMQ broker to compile
> >> into
> >> .NET. That would be an interesting task, though.
> >>
> >> What in particular is missing from NMS that you need/want to use?
> >>
> >> - Jim
> >>
> >> On Tue, Nov 18, 2008 at 5:19 PM, Postol <ft...@centrum.cz> wrote:
> >>
> >>>
> >>> Hi all,
> >>>
> >>> i want to ask if there is someone, who successfully converted ActiveMQ
> to
> >>> .NET libraries with IKVM, so he is able to use all functionality of
> >>> ActiveMQ
> >>> from C#. I know that there is NMS, but not all stuff is supported
> there,
> >>> so
> >>> i hope there will be someone, who tried it and was successfull with
> >>> conversion.
> >>>
> >>> I have just tried to convert it, but received a lot of exceptions about
> >>> missing classes and do not know the reason and how to resolve it...
> >>>
> >>> Can someone post step by step instructions how to make the conversion?
> >>>
> >>> Any help will be appreciated.
> >>>
> >>> Thanks in advance.
> >>>
> >>> Postol
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20572060.html
> >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20636322.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Jim Gomes <e....@gmail.com>.
You are welcome to add those missing features as enhancement requests
in the AMQNET JIRA database so they get added to a future version of
NMS. The NMS client is coming along nicely. If you have suggestions
on how to make it work better, they would be appreciated.
Best,
Jim
On 11/22/08, Postol <ft...@centrum.cz> wrote:
>
> Hello Jim,
>
> the most important feature which I am missing is deleting queues and topics
> programatically. I need it in my case scenario, where I am using a
> Client-Server architecture and each client creates a queue (for requests)
> and temporary queue (for responses) when connecting to Server. It is used
> for request-response communication and I need to delete the queue when
> Client is closed. Can not do it manually via JMX. Also need to delete
> durable subscribers (or virtual topic queues - btw. this excellent feature
> does not work now:( - will post to forum after this one). I have read that
> it is possible via JMXConnectorFactory.
>
> And i wanna try it also because some people mentioned, that the performance
> is better.
>
>
>
> semog wrote:
>>
>> Hi Postol,
>>
>> I don't know of any attempts at getting the ActiveMQ broker to compile
>> into
>> .NET. That would be an interesting task, though.
>>
>> What in particular is missing from NMS that you need/want to use?
>>
>> - Jim
>>
>> On Tue, Nov 18, 2008 at 5:19 PM, Postol <ft...@centrum.cz> wrote:
>>
>>>
>>> Hi all,
>>>
>>> i want to ask if there is someone, who successfully converted ActiveMQ to
>>> .NET libraries with IKVM, so he is able to use all functionality of
>>> ActiveMQ
>>> from C#. I know that there is NMS, but not all stuff is supported there,
>>> so
>>> i hope there will be someone, who tried it and was successfull with
>>> conversion.
>>>
>>> I have just tried to convert it, but received a lot of exceptions about
>>> missing classes and do not know the reason and how to resolve it...
>>>
>>> Can someone post step by step instructions how to make the conversion?
>>>
>>> Any help will be appreciated.
>>>
>>> Thanks in advance.
>>>
>>> Postol
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20572060.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20636322.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Postol <ft...@centrum.cz>.
Hello Jim,
the most important feature which I am missing is deleting queues and topics
programatically. I need it in my case scenario, where I am using a
Client-Server architecture and each client creates a queue (for requests)
and temporary queue (for responses) when connecting to Server. It is used
for request-response communication and I need to delete the queue when
Client is closed. Can not do it manually via JMX. Also need to delete
durable subscribers (or virtual topic queues - btw. this excellent feature
does not work now:( - will post to forum after this one). I have read that
it is possible via JMXConnectorFactory.
And i wanna try it also because some people mentioned, that the performance
is better.
semog wrote:
>
> Hi Postol,
>
> I don't know of any attempts at getting the ActiveMQ broker to compile
> into
> .NET. That would be an interesting task, though.
>
> What in particular is missing from NMS that you need/want to use?
>
> - Jim
>
> On Tue, Nov 18, 2008 at 5:19 PM, Postol <ft...@centrum.cz> wrote:
>
>>
>> Hi all,
>>
>> i want to ask if there is someone, who successfully converted ActiveMQ to
>> .NET libraries with IKVM, so he is able to use all functionality of
>> ActiveMQ
>> from C#. I know that there is NMS, but not all stuff is supported there,
>> so
>> i hope there will be someone, who tried it and was successfull with
>> conversion.
>>
>> I have just tried to convert it, but received a lot of exceptions about
>> missing classes and do not know the reason and how to resolve it...
>>
>> Can someone post step by step instructions how to make the conversion?
>>
>> Any help will be appreciated.
>>
>> Thanks in advance.
>>
>> Postol
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20572060.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20636322.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Jim Gomes <e....@gmail.com>.
Hi Postol,
I don't know of any attempts at getting the ActiveMQ broker to compile into
.NET. That would be an interesting task, though.
What in particular is missing from NMS that you need/want to use?
- Jim
On Tue, Nov 18, 2008 at 5:19 PM, Postol <ft...@centrum.cz> wrote:
>
> Hi all,
>
> i want to ask if there is someone, who successfully converted ActiveMQ to
> .NET libraries with IKVM, so he is able to use all functionality of
> ActiveMQ
> from C#. I know that there is NMS, but not all stuff is supported there, so
> i hope there will be someone, who tried it and was successfull with
> conversion.
>
> I have just tried to convert it, but received a lot of exceptions about
> missing classes and do not know the reason and how to resolve it...
>
> Can someone post step by step instructions how to make the conversion?
>
> Any help will be appreciated.
>
> Thanks in advance.
>
> Postol
> --
> View this message in context:
> http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20572060.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by ronniehuo <ro...@gmail.com>.
HI,i get the same warning as you,but it work fine.
Postol wrote:
>
> Hello,
>
> thanks for your reply. When i tried to run the command you mentioned, I
> still get the missing class warnings. Output library is created, but I am
> not sure if it is OK, because of warnings.
>
> Here are my steps for converting.
>
> 1) Downloaded ActiveMQ 5.1.2 - latest stable release ... extracted to
> folder C:\Users\postol\Desktop\Work\Tools\apache-activemq-5.2.0
> 2) Downloaded ikvm-0.36.0.11
> 3) Run cmd from \ikvm-0.36.0.11\bin folder
> 4) Run command ikvmc.exe -target:library -out:activemq-client.dll
> "C:\Users\postol\Desktop\Work\Tools\apache-activemq-5.2.0\activemq-all-5.2.0.jar"
>
> Please see attached output, which I get during the conversion.
>
> I hope you could help me:).
>
> Thanks and regards,
>
> Postol
>
> http://www.nabble.com/file/p20636179/output.txt output.txt
>
>
>
> user939393 wrote:
>>
>> I have and it works great.
>>
>> This command will create the dll that you need.
>> ikvmc.exe -target:library -out:activemq-client.dll "C:\Program
>> Files\Apache\apache-activemq-5.1.0\activemq-all-5.1.0.jar"
>>
>> Your project will also need to reference IKVM.OpenJDK.ClassLibrary.dll,
>> IKVM.Runtime.dll, and JVM.dll.
>>
>> I have found that this performs way better than NMS and you have access
>> to the full JMS API.
>>
>>
>>
>>
>> Postol wrote:
>>>
>>> Hi all,
>>>
>>> i want to ask if there is someone, who successfully converted ActiveMQ
>>> to .NET libraries with IKVM, so he is able to use all functionality of
>>> ActiveMQ from C#. I know that there is NMS, but not all stuff is
>>> supported there, so i hope there will be someone, who tried it and was
>>> successfull with conversion.
>>>
>>> I have just tried to convert it, but received a lot of exceptions about
>>> missing classes and do not know the reason and how to resolve it...
>>>
>>> Can someone post step by step instructions how to make the conversion?
>>>
>>> Any help will be appreciated.
>>>
>>> Thanks in advance.
>>>
>>> Postol
>>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p21886767.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Postol <ft...@centrum.cz>.
Hello,
thanks for your reply. When i tried to run the command you mentioned, I
still get the missing class warnings. Output library is created, but I am
not sure if it is OK, because of warnings.
Here are my steps for converting.
1) Downloaded ActiveMQ 5.1.2 - latest stable release ... extracted to folder
C:\Users\postol\Desktop\Work\Tools\apache-activemq-5.2.0
2) Downloaded ikvm-0.36.0.11
3) Run cmd from \ikvm-0.36.0.11\bin folder
4) Run command ikvmc.exe -target:library -out:activemq-client.dll
"C:\Users\postol\Desktop\Work\Tools\apache-activemq-5.2.0\activemq-all-5.2.0.jar"
Please see attached output, which I get during the conversion.
I hope you could help me:).
Thanks and regards,
Postol
http://www.nabble.com/file/p20636179/output.txt output.txt
user939393 wrote:
>
> I have and it works great.
>
> This command will create the dll that you need.
> ikvmc.exe -target:library -out:activemq-client.dll "C:\Program
> Files\Apache\apache-activemq-5.1.0\activemq-all-5.1.0.jar"
>
> Your project will also need to reference IKVM.OpenJDK.ClassLibrary.dll,
> IKVM.Runtime.dll, and JVM.dll.
>
> I have found that this performs way better than NMS and you have access to
> the full JMS API.
>
>
>
>
> Postol wrote:
>>
>> Hi all,
>>
>> i want to ask if there is someone, who successfully converted ActiveMQ to
>> .NET libraries with IKVM, so he is able to use all functionality of
>> ActiveMQ from C#. I know that there is NMS, but not all stuff is
>> supported there, so i hope there will be someone, who tried it and was
>> successfull with conversion.
>>
>> I have just tried to convert it, but received a lot of exceptions about
>> missing classes and do not know the reason and how to resolve it...
>>
>> Can someone post step by step instructions how to make the conversion?
>>
>> Any help will be appreciated.
>>
>> Thanks in advance.
>>
>> Postol
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20636179.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by Bryan Murphy <bm...@gmail.com>.
On Thu, Nov 20, 2008 at 11:18 AM, user939393
<mi...@tideworks.com> wrote:
>
> I have and it works great.
>
> This command will create the dll that you need.
> ikvmc.exe -target:library -out:activemq-client.dll "C:\Program
> Files\Apache\apache-activemq-5.1.0\activemq-all-5.1.0.jar"
>
> Your project will also need to reference IKVM.OpenJDK.ClassLibrary.dll,
> IKVM.Runtime.dll, and JVM.dll.
>
> I have found that this performs way better than NMS and you have access to
> the full JMS API.
Unfortunately, this method is not working so great for me. I took
ikvm v0.38.0.2, packaged the activemq 5.2.0 release jar and referenced
it in one of my test projects. I pointed the test project at my
ActiveMQ server, ran the test code, and every time I try and start the
connection I get the following exception:
JMSException: Channel was inactive for too long: /10.0.0.98:61616
Stack Trace:
at org.apache.activemq.ActiveMQConnection.syncSendPacket(Command command)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent()
at org.apache.activemq.ActiveMQConnection.start()
Alas, this does not appear to be a quick fix solution for me. For
reference, here is the code I ran to test the library (exception
thrown at connection.start()):
var factory = new
ActiveMQConnectionFactory("tcp://10.0.0.98:61616?keepAlive=true&soTimeout=30000&soTimeout=5000");
var connection = factory.createConnection();
connection.start();
var session = connection.createSession(false,
Session.__Fields.AUTO_ACKNOWLEDGE);
var destination = session.createQueue("TestQueue");
var producer = session.createProducer(destination);
producer.setDeliveryMode(DeliveryMode.__Fields.PERSISTENT);
for (int i = 0; i < 100; i++)
{
producer.send(session.createTextMessage(Guid.NewGuid().ToString("N")));
}
producer.close();
session.close();
connection.stop();
connection.close();
Re: How to create .NET dll of ActiveMQ with IKVM
Posted by user939393 <mi...@tideworks.com>.
I have and it works great.
This command will create the dll that you need.
ikvmc.exe -target:library -out:activemq-client.dll "C:\Program
Files\Apache\apache-activemq-5.1.0\activemq-all-5.1.0.jar"
Your project will also need to reference IKVM.OpenJDK.ClassLibrary.dll,
IKVM.Runtime.dll, and JVM.dll.
I have found that this performs way better than NMS and you have access to
the full JMS API.
Postol wrote:
>
> Hi all,
>
> i want to ask if there is someone, who successfully converted ActiveMQ to
> .NET libraries with IKVM, so he is able to use all functionality of
> ActiveMQ from C#. I know that there is NMS, but not all stuff is supported
> there, so i hope there will be someone, who tried it and was successfull
> with conversion.
>
> I have just tried to convert it, but received a lot of exceptions about
> missing classes and do not know the reason and how to resolve it...
>
> Can someone post step by step instructions how to make the conversion?
>
> Any help will be appreciated.
>
> Thanks in advance.
>
> Postol
>
--
View this message in context: http://www.nabble.com/How-to-create-.NET-dll-of-ActiveMQ-with-IKVM-tp20572060p20606025.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.