users@glassfish.java.net

Re: IDE Hot-deploy for OSGI hybrid Bundles

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Tue, 11 Oct 2011 06:15:24 -0700 (PDT)

I just realized that if you add the following property to the newly
created cfg file, then you can use target dir which means you can get
the desired behavior by invoking "mvn package."

felix.fileinstall.filter = .*\\.jar

Sahoo
On Tuesday 11 October 2011 10:21 AM, Sahoo wrote:
> This is an excellent suggestion. You can configure GlassFish to
> monitor you maven target directory like this:
>
> Add a file called org.apache.felix.fileinstall-foo.cfg in
> domain1/autodeploy/bundles/ with following content:
>
> # Use mvn local repo dir instead of target dir, otherwise fileinstall
> will try to deploy the target/classes as a bundle
> felix.fileinstall.dir=/home/ss141213/.m2/repository/org/glassfish/fighterfish/sample.uas.api/1.0.0-SNAPSHOT/
>
> # Poll every second
> felix.fileinstall.poll=500
> felix.fileinstall.log.level=3
> felix.fileinstall.bundles.new.start=true
> felix.fileinstall.bundles.startTransient=true
> felix.fileinstall.disableConfigSave=false
>
> Everytime you run mvn install, the bundle will get redeployed.
>
> You can as many such cfg files as one likes.
>
> Sahoo
> On Monday 10 October 2011 10:45 PM, Daoud Abdelmonem Faleh wrote:
>> Since Glassfish is using Felix file-install bundle I guess it's also
>> possible to point it to the project dist directory and have it
>> redeployed with each build or am I wrong Sahoo? (I used this approach
>> once with Apache Karaf http://twitpic.com/1npwny)
>>
>> WBR,
>> --Daoud.
>>
>> On Mon, Oct 10, 2011 at 6:24 PM, Sahoo<sanjeeb.sahoo_at_oracle.com> wrote:
>>> How are you building your hybrid app? Can you configure the build
>>> script to
>>> copy the jar to glassfish/autodeploy/bundles/ dir which is watched by
>>> glassfish to take appropriate actions like deploy/undeploy/redeploy
>>> depending on addtion/removal/updation of jars. It monitors every 5
>>> sec, but
>>> you can change that interval to something like 1 sec by editing the
>>> property
>>> felix.fileinstall.poll=5000 in
>>> glassfish/osgi/felix/conf/config.properties.
>>>
>>> The other option is to add a simple command like the one below at
>>> the end of
>>> your build:
>>>
>>> asadmin deploy --type osgi --force true<your jar file>
>>>
>>> I don't know if GlassFish NetBeans plugin can be used to
>>> deploy/redeploy
>>> hybrid apps using that plugin, otherwise that could be another option.
>>>
>>> HTH,
>>> Sahoo
>>> On Monday 10 October 2011 02:14 PM, forums_at_java.net wrote:
>>>> hello,
>>>>
>>>> I'm trying to build a productive ambient to work with osgi/java ee and
>>>> glassfish...
>>>> recently sahoo helped me to debug my bundles using NetBeans, but
>>>> i'm still
>>>> having difficult to re-deploy my bundles to glassfish..
>>>> it's really difficulting my development cycle.. each single change in
>>>> code, i
>>>> need to re-deploy my bundles manually by the system console or
>>>> glassfish
>>>> web-console...
>>>>
>>>> there is some maven-plugin or some way to configure NetBeans to
>>>> re-deploy
>>>> my
>>>> bundles automatically to glassfish, just like normal web-apps?
>>>>
>>>> thank you guys!
>>>>
>>>>
>>>> --
>>>>
>>>> [Message sent by forum member 'omeuefilipe']
>>>>
>>>> View Post: http://forums.java.net/node/851666
>>>>
>>>>
>>>
>