1 Reply Latest reply on May 23, 2012 1:47 AM by Charlee Chitsuk

    The glassfish-ejb-jar for Arquillian / Glassfish Embedded does not apply.

    Charlee Chitsuk Newbie

      Dear All,


      I've tried to learn the Arquillian version 1.0.0.Final by using the Glassfish embedded version 3.1.2. I've create a simple hello world EJB application as the following: -


      The Interface




      public interface DummyServiceable {


          String greet(@WebParam(name = "name")

                       final String name);




      The Service




              endpointInterface = "com.poc.DummyServiceable",

              serviceName       = "engine/DummyService",

              portName          = "DummyPort"


      public class DummyService implements DummyServiceable {


          public String greet(final String name) {

              String result = "Hello " + name;

              return result;




      The glassfish-ejb-jar.xml (Configured as CONFIDENTIAL)


      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN"
















      The unit test



      public class DummyServiceTester {


          public static JavaArchive createDeployment() {

              File file = new File("src/main/resources/META-INF/glassfish-ejb-jar.xml");

              Assert.assertNotNull("The glassfish specific file is not found.", file);


              return ShrinkWrap.create(JavaArchive.class, "myapp.jar")



                  .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")






          private DummyServiceable service;



          public void whenGreet(){

              Assert.assertNotNull("The service is null", this.service);

              String name = "Charlee";

              String expected = "Hello " + name;


              String actual = this.service.greet(name);


              Assert.assertEquals("The result is unexpected.", expected, actual);




      By overall, the Arquillian works very well together with Glassfish embedded 3.1.2. Anyhow, the glassfish-ejb-jar.xml does not apply as it is printed at the console as the following: -


      INFO: WS00019: EJB Endpoint deployed

      test  listening at address at http://CharleeCh:14080/engine/DummyService/DummyService


      I've tried to deploy the ear file to the remote Glassfish 3.1.2 with purpose to ensure that my glassfish-ejb-jar.xml is configured properly. The console shows me as the following: -



      WS00019: EJB Endpoint deployed

      arquillian-ear-0.0.1-SNAPSHOT  listening at address at https://CharleeCh:4081/engine/DummyService/DummyService|#]


      I'm not sure if I'm doing something wrong or not. Could you please help to advise further? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.




      Charlee Ch.