You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by mafranko <ra...@gmail.com> on 2011/04/08 16:15:32 UTC

Geronimo JSR-88 API

Hi all,

I just start to use Geronimo and I'm looking at an example of how deploy an
EAR, MDB, database pool and resource adapter using the geronimo JSR 88 API.

That's what I have now:

public static void main(String[] args) throws
DeploymentManagerCreationException {
        DeploymentFactoryManager dfm =
DeploymentFactoryManager.getInstance();
        dfm.registerDeploymentFactory(new DeploymentFactoryImpl());
        DeploymentManager dm = dfm.getDeploymentManager(
                      "deployer:geronimo:jmx://localhost:1099","system",
"manager");
        System.out.println(dm);
       
        javax.enterprise.deploy.spi.Target target = dm.getTargets()[0];
        System.out.println(target);
        ProgressObject po = dm.distribute(dm.getTargets(), new
File("my-ear"),
                new File("my-geronimo-application.xml"));
        do {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
            }
        } while(po.getDeploymentStatus().isRunning());
        dm.start(po.getResultTargetModuleIDs());
        System.out.println(po.getDeploymentStatus());
}

What I want is a way to pass the deployment plan information using some sort
of ObjectBean (DConfigBean??) instead of the XML file. That's possible?

Thanks! 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Geronimo-JSR-88-API-tp2795404p2795404.html
Sent from the Users mailing list archive at Nabble.com.

Re: Geronimo JSR-88 API

Posted by David Jencks <da...@yahoo.com>.
I don't believe that is possible.  I think the DConfigBeans were intended to provide a vaguely similar-looking way to manipulate different vendors plans in one vm, not to pass plans to a server.  

There might be a way to write a DConfigBean tree into a stream but IIRC you then have to supply your application as a stream as well.

BTW DConfigBeans were an idea that has been universally ignored and there is a good chance we will not support them in geronimo 3.  I think the geronimo plans are likely to have a jaxb object model which I think will be easier to use.

thanks
david jencks

On Apr 8, 2011, at 7:15 AM, mafranko wrote:

> Hi all,
> 
> I just start to use Geronimo and I'm looking at an example of how deploy an
> EAR, MDB, database pool and resource adapter using the geronimo JSR 88 API.
> 
> That's what I have now:
> 
> public static void main(String[] args) throws
> DeploymentManagerCreationException {
>        DeploymentFactoryManager dfm =
> DeploymentFactoryManager.getInstance();
>        dfm.registerDeploymentFactory(new DeploymentFactoryImpl());
>        DeploymentManager dm = dfm.getDeploymentManager(
>                      "deployer:geronimo:jmx://localhost:1099","system",
> "manager");
>        System.out.println(dm);
> 
>        javax.enterprise.deploy.spi.Target target = dm.getTargets()[0];
>        System.out.println(target);
>        ProgressObject po = dm.distribute(dm.getTargets(), new
> File("my-ear"),
>                new File("my-geronimo-application.xml"));
>        do {
>            try {
>                Thread.sleep(1000);
>            } catch (InterruptedException e) {
>            }
>        } while(po.getDeploymentStatus().isRunning());
>        dm.start(po.getResultTargetModuleIDs());
>        System.out.println(po.getDeploymentStatus());
> }
> 
> What I want is a way to pass the deployment plan information using some sort
> of ObjectBean (DConfigBean??) instead of the XML file. That's possible?
> 
> Thanks! 
> 
> --
> View this message in context: http://apache-geronimo.328035.n3.nabble.com/Geronimo-JSR-88-API-tp2795404p2795404.html
> Sent from the Users mailing list archive at Nabble.com.