activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Lang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APLO-135) Add example to the distro that shows how you can boot up an embedded broker in a Java app.
Date Thu, 06 Sep 2012 13:33:07 GMT

    [ https://issues.apache.org/jira/browse/APLO-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449643#comment-13449643
] 

Markus Lang commented on APLO-135:
----------------------------------

I've tried to execute the _java_embedded_broker_ example of the Apollo 1.4 Unix distro which
currently doesn't compile:

{noformat}
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/mlang/Downloads/apache-apollo-1.4/examples/java-embedded-broker/src/main/java/example/EmbeddedBroker.java:[42,14]
start(org.fusesource.hawtdispatch.Task) in org.apache.activemq.apollo.broker.Broker cannot
be applied to (<anonymous java.lang.Runnable>)

[ERROR] /home/mlang/Downloads/apache-apollo-1.4/examples/java-embedded-broker/src/main/java/example/EmbeddedBroker.java:[54,14]
update(org.apache.activemq.apollo.dto.BrokerDTO,org.fusesource.hawtdispatch.Task) in org.apache.activemq.apollo.broker.Broker
cannot be applied to (org.apache.activemq.apollo.dto.BrokerDTO,<anonymous java.lang.Runnable>)

[ERROR] /home/mlang/Downloads/apache-apollo-1.4/examples/java-embedded-broker/src/main/java/example/EmbeddedBroker.java:[67,14]
stop(org.fusesource.hawtdispatch.Task) in org.apache.activemq.apollo.broker.Broker cannot
be applied to (<anonymous java.lang.Runnable>)
{noformat}

After replacing the three _Runnable_ instances with _null_ I'm able to start the broker but
I'm not able to connect to _http://localhost:8080_. While starting the embedded broker using
the declared Maven dependencies it prints the following warning:

{noformat}
INFO  | Log$class | OS     : Linux 3.4.9-2.fc16.x86_64
INFO  | Log$class | JVM    : Java HotSpot(TM) 64-Bit Server VM 1.7.0_06 (Oracle Corporation)
INFO  | Log$class | Apollo : 1.4
INFO  | Log$class | OS is restricting the open file limit to: 4096
WARN  | Log$class | Could not start admistration interface.
INFO  | Log$class | Starting store: leveldb store at ./brokerStore
INFO  | Log$class | Accepting connections at: tcp://127.0.0.1:61613
INFO  | Log$class | Opening the log file took: 28.19 ms
{noformat}

Starting the broker with the command mentioned in the _readme.md_ that uses the _lib_ directory
works but with just using the declared Maven dependencies it doesn't. I've noticed that Jetty
isn't part of the transitive dependencies declared in the examples _pom.xml_. After adding
the following Jetty dependencies:

{noformat}
<dependency>
	<groupId>org.eclipse.jetty</groupId>
	<artifactId>jetty-webapp</artifactId>
	<version>7.6.5.v20120716</version>
</dependency>
<dependency>
	<groupId>org.eclipse.jetty</groupId>
	<artifactId>jetty-server</artifactId>
	<version>7.6.5.v20120716</version>
</dependency>
{noformat}

I was able to connect to the administration web interface.

{noformat}
INFO  | Log$class | OS     : Linux 3.4.9-2.fc16.x86_64
INFO  | Log$class | JVM    : Java HotSpot(TM) 64-Bit Server VM 1.7.0_06 (Oracle Corporation)
INFO  | Log$class | Apollo : 1.4
INFO  | Log$class | OS is restricting the open file limit to: 4096
INFO  | Log$class | Starting store: leveldb store at ./brokerStore
INFO  | Log$class | Accepting connections at: tcp://127.0.0.1:61613
INFO  | Server | jetty-7.6.5.v20120716
INFO  | StandardDescriptorProcessor | NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
INFO  | Log$class | Opening the log file took: 140.89 ms
Sep 06, 2012 3:22:44 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.7 05/20/2011 11:04 AM'
Sep 06, 2012 3:22:44 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Adding the following classes declared in META-INF/services/jersey-server-components
to the resource configuration:
  class org.fusesource.scalate.rest.NodeWriter
  class org.fusesource.scalate.rest.TransformerWriter
  class org.fusesource.scalate.rest.ViewWriter
  class org.fusesource.scalate.jersey.ScalateTemplateProcessor
  class org.fusesource.scalate.jersey.ScalateTemplateProvider
INFO  | AbstractConnector | Started SelectChannelConnector@127.0.0.1:8080
INFO  | Log$class | Administration interface available at: http://127.0.0.1:8080/
{noformat}
                
> Add example to the distro that shows how you can boot up an embedded broker in a Java
app.
> ------------------------------------------------------------------------------------------
>
>                 Key: APLO-135
>                 URL: https://issues.apache.org/jira/browse/APLO-135
>             Project: ActiveMQ Apollo
>          Issue Type: New Feature
>          Components: apollo-distro
>            Reporter: Hiram Chirino
>            Assignee: Hiram Chirino
>             Fix For: 1.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message