apache-mina

How do I specify a TCP transport is server mode (listening) or client mode in activemq?

The example given for a spring injected endpoint is as follows: <endpoint id="hl7listener" uri="mina:tcp://localhost:8888?sync=true&amp;codec=hl7codec"/> How do I setup a client mode endpoint such that is will connect to a specific port on another server? How do I configure the endpoint to listen for inbound connections? (the example...

ActiveMQ setup of tcp socket using mina

I am trying to setup a simple demo of activemq and mina. I edited the camelContext in the activemq.xml file to include two mina tcp sockets, two queues and routes as such: listenerA -> qA -> listenerB listenerB -> qB -> listenerA The intent is to have two way pass through between two telnet sessions. Later, I will add more fancy feat...

An established connection was aborted by the software in your host machine

The application uses quickfixj library, which uses Apache Mina. This application keeps a socket connection to a remote host. Suddenly we get the following error: [SocketConnectorIoProcessor-0.0] - ERROR quickfix.mina.initiator.InitiatorIoHandler - socket exception (/xxx.xxx.xxx.xxx:xx): An established connection was aborted by the s...

Netty vs Apache MINA

Pros/Cons of using either ? They both provide roughly the same functionality. Which should I choose to develop my high performance TCP server ? ...

Is there a modbus implementation which uses Mina 2.x?

Is there a open source modbus implementation which uses Apache Mina 2.x? ...

Java Server Side App, How to?

I am building a scalable Server Side App in Java but I need to know the "Do's and the Dont's". The app needs clients to connect to the server via TCP Sockets, I heard lot of good things about Apache MINA so I thought I'd give it a try and build around this. I would also need the app to communicate to a Database and send suitable dat...

Trouble synchronizing threads with Apache Mina

I'm using Apache Mina 1.1.7 and Java 1.6. The server sends a sequence of three messages to the client in loop. Sometimes two sets of messages overlap. For example, I am expecting: ++ recv: MSGHEAD ++ recv: message body 1 ++ recv: . ++ recv: MSGHEAD ++ recv: message body 2 ++ recv: . but I get this instead: ++ recv: MSGHEAD ++ recv...

How to properly send data via MINA?

I'm attempting to get started with MINA, and all of the examples seem to have data written to the session, rather than making use of a method that can write the same type of data over and over. I'm trying to make use of org.apache.mina.filter.codec.demux.MessageEncoder / MessageDecoder to encode / decode messages, which will allow me to...

MINA: Is finishDecode where I send a response message?

In using Apache MINA, I'm sending a login request from the client, which is interpreted on the server via LoginRequestDecoder (implements org.apache.mina.filter.codec.demux.MessageDecoder). I now want to send a response (LoginResponse) that includes a success/failure code. Should I be sending the response from the LoginRequestDecoder's...

Import PEM into Java Key Store

I am trying to connect to an SSL server which requires me to authenticate myself. In order to use SSL over Apache MINA I need a suitable JKS file. However, I have only been given a .PEM file. How would I go about creating a JKS file from a PEM file? ...

Apache Mina Server Restart java.net.BindException: Address already in use

Hello, I have a rather annoying problem in my server application. I bind Apache Mina with the following code: acceptor.bind(new InetSocketAddress(PORT)); Where acceptor is an NioSocketAcceptor. Over a HTTP interface I can shutdown the server so I can restart it. Server.ioAcceptor.unbind(new InetSocketAddress(Server.PORT)); f...

MINA: Performing synchronous write requests / read responses

I'm attempting to perform a synchronous write/read in a demux-based client application with MINA 2.0 RC1, but it seems to get stuck. Here is my code: public boolean login(final String username, final String password) { // block inbound messages session.getConfig().setUseReadOperation(true); // send the login request fi...

Difference of HTTP Components, Restlet, Apache Mina and Netty

I used HTTPComponents to implement a custom web server that access SQLite database. Requests are sent via TCP/IP and I am using REST concepts. By the way my frontend is HTML/jQuery. I know it will be a lot easier if I'll just create a servlet but I am restricted to just using apache http server. I really don't get good performance in usi...

Apache MINA NIO connector help

I'm new to using MINA. I've a program which uses MINA NIOconnector to connect to host. I'm able to send data and also receive. This is clear from log4j log which i'm attaching below. E:\>java TC4HostClient [12:21:46] NioProcessor-1 INFO [] [] [org.apache.mina.filter.logging.LoggingFil ter] - CREATED [12:21:46] NioProcessor-1 INFO [] [...

strange messages in log file @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^....

Hello, I have a application server for network operations written with Java based on Apache Mina. Recently I encounter a strange behavior in my log files. I noticed that the log file is full of @^@^@^@^@^@^@^@^@^@^@^@^.... characters. I mean those unexpected characters are vast amount of as such the log file gets hundreds of GB in a cou...

Proxy examples using org.apache.mina.proxy?

Does anyone know of any examples, ideally HTTP proxy, using the org.apache.mina.proxy package? ...

Annoyance - Warning when using Mina 2.x with Spring 3.x

Anyone know of a good way to get rid of this warning, besides increasing the log level? Mind you everything in the server still works as expected, but this occurs every time the server is restarted. o.s.b.f.c.CustomEditorConfigurer - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrar...

Using JAVA NIO framework in SPRING server

I'm implementing an hybrid server application that mixes a Web-Servlet and a plain Java application. The java application manages thousands of sockets for remote devices, while the Web application interacts with the user to set/read the state of any socket. Java NIO, or Apache-MINA vs Jboss-Netty, seems to be good options for the socket...