Loading verticles at runtime 1.3.1

108 views
Skip to first unread message

Eddie C

unread,
May 25, 2013, 6:54:22 PM5/25/13
to ve...@googlegroups.com
Is this the correct way to load up a verticle?

Vertx x = Vertx.newVertx();
VerticleManager vm = new VerticleManager((VertxInternal) x);
Container c = new Container(vm);
c.deployVerticle("x.SetVerticle", 10);

package xxx;
import org.vertx.java.deploy.Verticle;
public class SetVerticle extends Verticle {
  public void start() throws Exception {
    System.out.println("lets do this");
    this.getVertx().eventBus().registerHandler("operations.set", new SetHandler());
  }
}

This code produces no error but when I put messages on the evenbus for this handler I do not receive them. I put a langs.properties and a cluster.xml in the project still no luck.

bytor99999

unread,
May 29, 2013, 11:46:12 AM5/29/13
to ve...@googlegroups.com
You will need to post a bit more. Like what does the sending code look like. What are you listening on for the main verticle? Looks like SetVerticle is the main verticle, but where is the listen code? I think there is code missing that either you didn't post or didn't write that needs to be there. Have you looked at the simple examples in the github repo? Or the documentation for the simple app?

Thanks

Mark

Edward Capriolo

unread,
May 31, 2013, 2:11:38 AM5/31/13
to ve...@googlegroups.com
Ok so I have been playing around with this for a couple of days now. So I just upgraded to 2.0.0-beta4.

I have this test:
  @Test
  public void bla() throws Exception {

    final CountDownLatch latch = new CountDownLatch(1);
   
    //new AsyncResultHandler<String>() {
    //new PlatformLocator().factory.createPlatformManager().deployModule("com.jointhegrid~setmodule~1.0", config, 10,  new AsyncResultHandler<String>() {
   
    JsonObject config = new JsonObject();

    //config.putString("address", "operations.set");
    config.putString("worker", "true");
   
   
      new PlatformLocator().factory.createPlatformManager()
      .deployModuleFromClasspath("com.jointhegrid~setmodule~1.0", config, 10, new URL[0] , new AsyncResultHandler<String>() {
        @Override
        public void handle(AsyncResult<String> event) {
          if (event.succeeded()) {
            System.out.println("event suc "+event.succeeded());
            latch.countDown();
          } else {
           
            event.cause().printStackTrace();
            latch.countDown();
          }
        }
      });
   
     
      final CountDownLatch latch2 = new CountDownLatch(1);
     PlatformLocator.factory.createPlatformManager().vertx().eventBus().send("operations.set", new JsonObject(),  new Handler<Message<JsonObject>>(){
                                                                            
      @Override
      public void handle(Message<JsonObject> event) {
        System.out.println( event.body() );
        latch2.countDown();
      }
      
     });
     latch2.await(5, TimeUnit.SECONDS);
  }



And this module:
public class SetModule extends BusModBase implements Handler<Message<JsonObject>>{
  public SetModule(){
    super();
    System.out.println("loaded");
  }

  public void start(){
    System.out.println("start");
    super.start();
    eb.registerHandler("operations.set", this);
  }
  @Override
  public void handle(Message<JsonObject> event) {
    System.out.println("Got set eve t");
    event.reply(  new JsonObject("yea"));
  }
   
}

and the output looks like this:

loaded
loaded
loaded
loaded
start
start
start
start
loaded
start
loaded
loaded
loaded
start
start
start
loaded
loaded
start
start
event suc true
May 31, 2013 2:03:59 AM org.vertx.java.core.logging.impl.JULLogDelegate info
INFO: deploy succeeded? true

So I am seeing vertx load this module, but when I send events to the address it is registered at,I get no reply. It must be something simple butI can not see it.



--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tim Fox

unread,
May 31, 2013, 2:30:31 AM5/31/13
to ve...@googlegroups.com
You're making life much more complicated that in needs be. Please take a
look at the wiki pages about how to get started with Maven and Gradle
and how to run tests with Vert.x.

The example Gradle/Maven projects contain examples of how to write and
test a module. I recommend you start from there.
>>> VerticleManager vm = new VerticleManager((**VertxInternal) x);
>>> Container c = new Container(vm);
>>> c.deployVerticle("x.**SetVerticle", 10);
>>>
>>> package xxx;
>>> import org.vertx.java.deploy.**Verticle;
>>> public class SetVerticle extends Verticle {
>>> public void start() throws Exception {
>>> System.out.println("lets do this");
>>> this.getVertx().eventBus().**registerHandler("operations.**set", new

Edward Capriolo

unread,
May 31, 2013, 2:53:39 AM5/31/13
to ve...@googlegroups.com
I know I am making things so hard...Just about as hard as finding the vertx wiki.

Lets see, not a single reference to the word wiki on the front page of vertx.io...

Like when you search google:
site:vertx.io wiki
You get two results:

One takes takes you to a page that makes no mention of maven.

The other has a link to the vertx  wiki that goes here.

https://github.com/vert-x/vert.x/wiki

And unless you guess that a blank front page means you should click on the pages button above you would have no idea that there were any documents at all.



For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.

Tim Fox

unread,
May 31, 2013, 2:58:54 AM5/31/13
to ve...@googlegroups.com
It's just the standard github wiki, that many github projects use.

All the pages are listed on the "pages" page.
>>> PlatformLocator().factory.**createPlatformManager().**
>>> deployModule("com.jointhegrid~**setmodule~1.0",
>>> config, 10, new AsyncResultHandler<String>() {
>>>
>>> JsonObject config = new JsonObject();
>>>
>>> //config.putString("address", "operations.set");
>>> config.putString("worker", "true");
>>>
>>>
>>> new PlatformLocator().factory.**createPlatformManager()
>>> .deployModuleFromClasspath("**com.jointhegrid~setmodule~1.0"**,
>>> config,
>>> 10, new URL[0] , new AsyncResultHandler<String>() {
>>> @Override
>>> public void handle(AsyncResult<String> event) {
>>> if (event.succeeded()) {
>>> System.out.println("event suc "+event.succeeded());
>>> latch.countDown();
>>> } else {
>>>
>>> event.cause().printStackTrace(**);
>>> latch.countDown();
>>> }
>>> }
>>> });
>>>
>>>
>>> final CountDownLatch latch2 = new CountDownLatch(1);
>>>
>>> PlatformLocator.factory.**createPlatformManager().vertx(**
>>> ).eventBus().send("operations.**set",
>>> new JsonObject(), new Handler<Message<JsonObject>>()**{
>>>
>>>
>>> @Override
>>> public void handle(Message<JsonObject> event) {
>>> System.out.println( event.body() );
>>> latch2.countDown();
>>> }
>>>
>>> });
>>> latch2.await(5, TimeUnit.SECONDS);
>>> }
>>>
>>>
>>>
>>> And this module:
>>> public class SetModule extends BusModBase implements
>>> Handler<Message<JsonObject>>{
>>> public SetModule(){
>>> super();
>>> System.out.println("loaded");
>>> }
>>>
>>> public void start(){
>>> System.out.println("start");
>>> super.start();
>>> eb.registerHandler("**operations.set", this);
>>> May 31, 2013 2:03:59 AM org.vertx.java.core.logging.**impl.JULLogDelegate
>>> info
>>> INFO: deploy succeeded? true
>>>
>>> So I am seeing vertx load this module, but when I send events to the
>>> address it is registered at,I get no reply. It must be something simple
>>> butI can not see it.
>>>
>>>
>>>
>>> On Wed, May 29, 2013 at 11:46 AM, bytor99999 <bytor...@gmail.com>
>>> wrote:
>>>
>>> You will need to post a bit more. Like what does the sending code look
>>>> like. What are you listening on for the main verticle? Looks like
>>>> SetVerticle is the main verticle, but where is the listen code? I think
>>>> there is code missing that either you didn't post or didn't write that
>>>> needs to be there. Have you looked at the simple examples in the github
>>>> repo? Or the documentation for the simple app?
>>>>
>>>> Thanks
>>>>
>>>> Mark
>>>>
>>>> On Saturday, May 25, 2013 3:54:22 PM UTC-7, Eddie C wrote:
>>>>
>>>>> Is this the correct way to load up a verticle?
>>>>>
>>>>> Vertx x = Vertx.newVertx();
>>>>> VerticleManager vm = new VerticleManager((****VertxInternal) x);
>>>>> Container c = new Container(vm);
>>>>> c.deployVerticle("x.****SetVerticle", 10);
>>>>>
>>>>> package xxx;
>>>>> import org.vertx.java.deploy.****Verticle;
>>>>> public class SetVerticle extends Verticle {
>>>>> public void start() throws Exception {
>>>>> System.out.println("lets do this");
>>>>> this.getVertx().eventBus().****registerHandler("operations.****set",
>>>>> new
>>>>> SetHandler());
>>>>> }
>>>>> }
>>>>>
>>>>> This code produces no error but when I put messages on the evenbus for
>>>>> this handler I do not receive them. I put a langs.properties and a
>>>>> cluster.xml in the project still no luck.
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "vert.x" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsu...@googlegroups.com>
>>>> .
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsu...@googlegroups.com>
>> .
>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>

Tim Fox

unread,
May 31, 2013, 2:59:46 AM5/31/13
to ve...@googlegroups.com
On 31/05/13 07:53, Edward Capriolo wrote:
> I know I am making things so hard...Just about as hard as finding the vertx
> wiki.
>
> Lets see, not a single reference to the word wiki on the front page of
> vertx.io...

That's because this stuff is all new in 2.0 and the site vertx.io refers
to vert.x 1.x
>
> Like when you search google:
> site:vertx.io wiki
> You get two results:
>
> One takes takes you to a page that makes no mention of maven.
>
> The other has a link to the vertx wiki that goes here.
>
> https://github.com/vert-x/vert.x/wiki
>
> And unless you guess that a blank front page means you should click on the
> pages button above you would have no idea that there were any documents at
> all.
>
>
> On Fri, May 31, 2013 at 2:30 AM, Tim Fox <timv...@gmail.com> wrote:
>
>> You're making life much more complicated that in needs be. Please take a
>> look at the wiki pages about how to get started with Maven and Gradle and
>> how to run tests with Vert.x.
>>
>> The example Gradle/Maven projects contain examples of how to write and
>> test a module. I recommend you start from there.
>>
>> On 31/05/13 07:11, Edward Capriolo wrote:
>>
>>> Ok so I have been playing around with this for a couple of days now. So I
>>> just upgraded to 2.0.0-beta4.
>>>
>>> I have this test:
>>> @Test
>>> public void bla() throws Exception {
>>>
>>> final CountDownLatch latch = new CountDownLatch(1);
>>>
>>> //new AsyncResultHandler<String>() {
>>> //new
>>> PlatformLocator().factory.**createPlatformManager().**
>>> deployModule("com.jointhegrid~**setmodule~1.0",
>>> config, 10, new AsyncResultHandler<String>() {
>>>
>>> JsonObject config = new JsonObject();
>>>
>>> //config.putString("address", "operations.set");
>>> config.putString("worker", "true");
>>>
>>>
>>> new PlatformLocator().factory.**createPlatformManager()
>>> .deployModuleFromClasspath("**com.jointhegrid~setmodule~1.0"**,
>>> config,
>>> 10, new URL[0] , new AsyncResultHandler<String>() {
>>> @Override
>>> public void handle(AsyncResult<String> event) {
>>> if (event.succeeded()) {
>>> System.out.println("event suc "+event.succeeded());
>>> latch.countDown();
>>> } else {
>>>
>>> event.cause().printStackTrace(**);
>>> latch.countDown();
>>> }
>>> }
>>> });
>>>
>>>
>>> final CountDownLatch latch2 = new CountDownLatch(1);
>>>
>>> PlatformLocator.factory.**createPlatformManager().vertx(**
>>> ).eventBus().send("operations.**set",
>>> new JsonObject(), new Handler<Message<JsonObject>>()**{
>>>
>>>
>>> @Override
>>> public void handle(Message<JsonObject> event) {
>>> System.out.println( event.body() );
>>> latch2.countDown();
>>> }
>>>
>>> });
>>> latch2.await(5, TimeUnit.SECONDS);
>>> }
>>>
>>>
>>>
>>> And this module:
>>> public class SetModule extends BusModBase implements
>>> Handler<Message<JsonObject>>{
>>> public SetModule(){
>>> super();
>>> System.out.println("loaded");
>>> }
>>>
>>> public void start(){
>>> System.out.println("start");
>>> super.start();
>>> eb.registerHandler("**operations.set", this);
>>> May 31, 2013 2:03:59 AM org.vertx.java.core.logging.**impl.JULLogDelegate
>>> info
>>> INFO: deploy succeeded? true
>>>
>>> So I am seeing vertx load this module, but when I send events to the
>>> address it is registered at,I get no reply. It must be something simple
>>> butI can not see it.
>>>
>>>
>>>
>>> On Wed, May 29, 2013 at 11:46 AM, bytor99999 <bytor...@gmail.com>
>>> wrote:
>>>
>>> You will need to post a bit more. Like what does the sending code look
>>>> like. What are you listening on for the main verticle? Looks like
>>>> SetVerticle is the main verticle, but where is the listen code? I think
>>>> there is code missing that either you didn't post or didn't write that
>>>> needs to be there. Have you looked at the simple examples in the github
>>>> repo? Or the documentation for the simple app?
>>>>
>>>> Thanks
>>>>
>>>> Mark
>>>>
>>>> On Saturday, May 25, 2013 3:54:22 PM UTC-7, Eddie C wrote:
>>>>
>>>>> Is this the correct way to load up a verticle?
>>>>>
>>>>> Vertx x = Vertx.newVertx();
>>>>> VerticleManager vm = new VerticleManager((****VertxInternal) x);
>>>>> Container c = new Container(vm);
>>>>> c.deployVerticle("x.****SetVerticle", 10);
>>>>>
>>>>> package xxx;
>>>>> import org.vertx.java.deploy.****Verticle;
>>>>> public class SetVerticle extends Verticle {
>>>>> public void start() throws Exception {
>>>>> System.out.println("lets do this");
>>>>> this.getVertx().eventBus().****registerHandler("operations.****set",
>>>>> new
>>>>> SetHandler());
>>>>> }
>>>>> }
>>>>>
>>>>> This code produces no error but when I put messages on the evenbus for
>>>>> this handler I do not receive them. I put a langs.properties and a
>>>>> cluster.xml in the project still no luck.
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "vert.x" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsu...@googlegroups.com>
>>>> .
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsu...@googlegroups.com>
>> .
>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>

Tim Fox

unread,
May 31, 2013, 3:11:15 AM5/31/13
to ve...@googlegroups.com
Also bear in mind, that you're using Vert.x 2.0 which is still in development and we haven't done the documentation yet.

Once we do the docs things should be easier to find
>>>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsubscribe@googlegroups.com>
>>>> .
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsubscribe@googlegroups.com>

Edward Capriolo

unread,
May 31, 2013, 3:11:53 AM5/31/13
to ve...@googlegroups.com
The archetype does not install.

[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Project - sethandler 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for io.vertx:vertx-maven-plugin:jar:2.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.650s
[INFO] Finished at: Fri May 31 03:05:09 EDT 2013
[INFO] Final Memory: 4M/117M
[INFO] ------------------------------------------------------------------------


And at least one of the tests it creates fails..

  @Test
  public void testDeployMod() {
    container.deployModule(System.getProperty("vertx.modulename"), new AsyncResultHandler<String>() {
      @Override
      public void handle(AsyncResult<String> asyncResult) {
        assertTrue(asyncResult.succeeded());
        assertNotNull("deploymentID should not be null", asyncResult.result());
        testComplete();
      }
    });
  }


java.lang.AssertionError: deploymentID should not be null
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)
    at org.junit.Assert.assertNotNull(Assert.java:621)
    at org.vertx.testtools.VertxAssert.assertNotNull(VertxAssert.java:240)
    at com.jointhegrid.integration.java.ExampleIntegrationTest$1.handle(ExampleIntegrationTest.java:46)
    at com.jointhegrid.integration.java.ExampleIntegrationTest$1.handle(ExampleIntegrationTest.java:1)
    at org.vertx.java.platform.impl.DefaultPlatformManager$12$1.run(DefaultPlatformManager.java:438)
    at org.vertx.java.core.impl.DefaultContext$2.run(DefaultContext.java:145)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:364)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:326)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:114)
    at java.lang.Thread.run(Thread.java:722)

It seems like this archetype generates a Verticle. Seems odd because I thought the advice was generate modules not verticles.


--
You received this message because you are subscribed to the Google Groups
"vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Tim Fox

unread,
May 31, 2013, 3:27:43 AM5/31/13
to ve...@googlegroups.com
On 31/05/13 08:11, Edward Capriolo wrote:
> The archetype does not install.
Are you using snapshot from oss.sonatype?

We haven't released the archetype yet to MC (again 2.0 stuff still in
development)
Most probably the dependency versions need updating

>
> It seems like this archetype generates a Verticle. Seems odd because I
> thought the advice was generate modules not verticles.

It creates a module which contains a verticle
>
>
> On Fri, May 31, 2013 at 2:59 AM, Tim Fox <timv...@gmail.com> wrote:
>
>> On 31/05/13 07:53, Edward Capriolo wrote:
>>
>>> I know I am making things so hard...Just about as hard as finding the
>>> vertx
>>> wiki.
>>>
>>> Lets see, not a single reference to the word wiki on the front page of
>>> vertx.io...
>>>
>> That's because this stuff is all new in 2.0 and the site vertx.io refers
>> to vert.x 1.x
>>
>>> Like when you search google:
>>> site:vertx.io wiki
>>> You get two results:
>>>
>>> One takes takes you to a page that makes no mention of maven.
>>>
>>> The other has a link to the vertx wiki that goes here.
>>>
>>> https://github.com/vert-x/**vert.x/wiki<https://github.com/vert-x/vert.x/wiki>
>>>
>>> And unless you guess that a blank front page means you should click on the
>>> pages button above you would have no idea that there were any documents at
>>> all.
>>>
>>>
>>> On Fri, May 31, 2013 at 2:30 AM, Tim Fox <timv...@gmail.com> wrote:
>>>
>>> You're making life much more complicated that in needs be. Please take a
>>>> look at the wiki pages about how to get started with Maven and Gradle and
>>>> how to run tests with Vert.x.
>>>>
>>>> The example Gradle/Maven projects contain examples of how to write and
>>>> test a module. I recommend you start from there.
>>>>
>>>> On 31/05/13 07:11, Edward Capriolo wrote:
>>>>
>>>> Ok so I have been playing around with this for a couple of days now. So
>>>>> I
>>>>> just upgraded to 2.0.0-beta4.
>>>>>
>>>>> I have this test:
>>>>> @Test
>>>>> public void bla() throws Exception {
>>>>>
>>>>> final CountDownLatch latch = new CountDownLatch(1);
>>>>>
>>>>> //new AsyncResultHandler<String>() {
>>>>> //new
>>>>> PlatformLocator().factory.****createPlatformManager().**
>>>>> deployModule("com.jointhegrid~****setmodule~1.0",
>>>>> config, 10, new AsyncResultHandler<String>() {
>>>>>
>>>>> JsonObject config = new JsonObject();
>>>>>
>>>>> //config.putString("address", "operations.set");
>>>>> config.putString("worker", "true");
>>>>>
>>>>>
>>>>> new PlatformLocator().factory.****createPlatformManager()
>>>>> .deployModuleFromClasspath("****com.jointhegrid~setmodule~1.0"*
>>>>> ***,
>>>>> config,
>>>>> 10, new URL[0] , new AsyncResultHandler<String>() {
>>>>> @Override
>>>>> public void handle(AsyncResult<String> event) {
>>>>> if (event.succeeded()) {
>>>>> System.out.println("event suc "+event.succeeded());
>>>>> latch.countDown();
>>>>> } else {
>>>>>
>>>>> event.cause().printStackTrace(****);
>>>>> latch.countDown();
>>>>> }
>>>>> }
>>>>> });
>>>>>
>>>>>
>>>>> final CountDownLatch latch2 = new CountDownLatch(1);
>>>>>
>>>>> PlatformLocator.factory.****createPlatformManager().vertx(****
>>>>> ).eventBus().send("operations.****set",
>>>>> new JsonObject(), new Handler<Message<JsonObject>>()****{
>>>>>
>>>>>
>>>>> @Override
>>>>> public void handle(Message<JsonObject> event) {
>>>>> System.out.println( event.body() );
>>>>> latch2.countDown();
>>>>> }
>>>>>
>>>>> });
>>>>> latch2.await(5, TimeUnit.SECONDS);
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> And this module:
>>>>> public class SetModule extends BusModBase implements
>>>>> Handler<Message<JsonObject>>{
>>>>> public SetModule(){
>>>>> super();
>>>>> System.out.println("loaded");
>>>>> }
>>>>>
>>>>> public void start(){
>>>>> System.out.println("start");
>>>>> super.start();
>>>>> eb.registerHandler("****operations.set", this);
>>>>> May 31, 2013 2:03:59 AM org.vertx.java.core.logging.****
>>>>> impl.JULLogDelegate
>>>>> info
>>>>> INFO: deploy succeeded? true
>>>>>
>>>>> So I am seeing vertx load this module, but when I send events to the
>>>>> address it is registered at,I get no reply. It must be something simple
>>>>> butI can not see it.
>>>>>
>>>>>
>>>>>
>>>>> On Wed, May 29, 2013 at 11:46 AM, bytor99999 <bytor...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> You will need to post a bit more. Like what does the sending code look
>>>>>
>>>>>> like. What are you listening on for the main verticle? Looks like
>>>>>> SetVerticle is the main verticle, but where is the listen code? I think
>>>>>> there is code missing that either you didn't post or didn't write that
>>>>>> needs to be there. Have you looked at the simple examples in the github
>>>>>> repo? Or the documentation for the simple app?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Mark
>>>>>>
>>>>>> On Saturday, May 25, 2013 3:54:22 PM UTC-7, Eddie C wrote:
>>>>>>
>>>>>> Is this the correct way to load up a verticle?
>>>>>>> Vertx x = Vertx.newVertx();
>>>>>>> VerticleManager vm = new VerticleManager((******VertxInternal) x);
>>>>>>> Container c = new Container(vm);
>>>>>>> c.deployVerticle("x.******SetVerticle", 10);
>>>>>>>
>>>>>>> package xxx;
>>>>>>> import org.vertx.java.deploy.******Verticle;
>>>>>>> public class SetVerticle extends Verticle {
>>>>>>> public void start() throws Exception {
>>>>>>> System.out.println("lets do this");
>>>>>>> this.getVertx().eventBus().******registerHandler("operations.**
>>>>>>> ****set",
>>>>>>> new
>>>>>>> SetHandler());
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> This code produces no error but when I put messages on the evenbus for
>>>>>>> this handler I do not receive them. I put a langs.properties and a
>>>>>>> cluster.xml in the project still no luck.
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups
>>>>>> "vert.x" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>> an
>>>>>> email to vertx+unsubscribe@**googlegrou**ps.com<http://googlegroups.com>
>>>>>> <vertx%2Bunsubscribe@**googlegroups.com<vertx%252Buns...@googlegroups.com>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/****groups/opt_out<https://groups.google.com/**groups/opt_out>
>>>>>> <https://groups.**google.com/groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "vert.x" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to vertx+unsubscribe@**googlegrou**ps.com<http://googlegroups.com>
>>>> <vertx%2Bunsubscribe@**googlegroups.com<vertx%252Buns...@googlegroups.com>
>>>> .
>>>> For more options, visit https://groups.google.com/****groups/opt_out<https://groups.google.com/**groups/opt_out>
>>>> <https://groups.**google.com/groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsu...@googlegroups.com>

Tim Fox

unread,
May 31, 2013, 3:38:00 AM5/31/13
to ve...@googlegroups.com
Yup, it needs updating to the latest version of Vert.x.

I won't be around much today, but I can do this tomorrow morning.
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/****groups/opt_out<https://groups.google.com/**groups/opt_out>
>>>>>> <https://groups.**google.com/groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "vert.x" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to vertx+unsubscribe@**googlegrou**ps.com<http://googlegroups.com>
>>>> .
>>>> For more options, visit https://groups.google.com/****groups/opt_out<https://groups.google.com/**groups/opt_out>
>>>> <https://groups.**google.com/groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vertx+unsubscribe@**googlegroups.com<vertx%2Bunsubscribe@googlegroups.com>

Tim Fox

unread,
Jun 1, 2013, 12:50:10 PM6/1/13
to ve...@googlegroups.com
Ok... I've released 1 .0.0-beta1 of the archetype and plugin to Maven Central (it took some time to sync but is there now).

So you should be able to do:

mvn archetype:generate -Dfilter=io.vertx:

Fill in the fields for your module

Then cd <directory name>

mvn integration-test

Generate project files for Eclipse/IDEA;

mvn idea:idea

or mvn eclipse:eclipse

Then open the project in your IDE, run tests etc

I've tested it all here and it seems to work fine.
Reply all
Reply to author
Forward
0 new messages