tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@gmail.com>
Subject Re: Deploy unpacked jar
Date Tue, 17 Jan 2012 19:06:13 GMT
The apps/ dir itself supports unpacked jar files.  As Romain guessed, the deploy tool only
supports zip files (jars, ears, wars, rars).

This is because the command line deploy tool actually uploads the jar file by reading the
file from disk and sending to the server over a socket.  We could support having the deploy
tool automatically zip up the directory you pick and then send the zip contents over the socket
to the server, but I suspect that isn't what you want.  I suspect you were imagining something
where it would only send the changed files -- that would definitely be harder.

As the goal is ultimately speed of development, the embedded approaches are hands down far
better.  Here are some links in case you haven't checked them out yet:

   http://vimeo.com/6149008

Note that video says "Testing EJBs", but in actuality you can unit test anything from the
OpenEJB column on this page using the exact same setup:

   http://openejb.apache.org/comparison.html

It's quite a lot.  As well you can take a slightly varied approach and build your app in code,
kind of like Jetty.  A couple nice examples of that here:

  http://openejb.apache.org/examples-trunk/application-composer/README.html
  http://stackoverflow.com/questions/8713945/unit-testing-a-ejb3-0-which-has-another-ejb-injected/8716630#8716630


-David


On Jan 17, 2012, at 9:51 AM, Mansour Al Akeel wrote:

> openejb standalone is what I am using. And that's what docs say.
> 
> 
> 
> On Tue, Jan 17, 2012 at 12:31 PM, Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
>> yep.
>> 
>> create a apps/ folder in tomee directory.
>> 
>> then move your exploded jar in this folder.
>> 
>> Finally start TomEE and the magic should appear.
>> 
>> I tried this commands and it works:
>>> cp
>> ~/.m2/repository/org/apache/openejb/apache-tomee/1.0.0-beta-2-SNAPSHOT/apache-tomee-1.0.0-beta-2-SNAPSHOT-webprofile.zip
>> .
>>> unzip apache-tomee-1.0.0-beta-2-SNAPSHOT-webprofile.zip
>>> cd apache-tomee-webprofile-1.0.0-beta-2-SNAPSHOT/
>>> cp
>> ~/.m2/repository/org/superbiz/simple-stateless/1.1-SNAPSHOT/simple-stateless-1.1-SNAPSHOT.jar
>> .
>>> mkdir apps
>>> mv simple-stateless-1.1-SNAPSHOT.jar apps/
>>> cd apps/
>>> mkdir simple-stateless
>>> mv simple-stateless-1.1-SNAPSHOT.jar simple-stateless
>>> cd simple-stateless/
>>> jar xvf simple-stateless-1.1-SNAPSHOT.jar
>>> cd ..
>>> rm simple-stateless/simple-stateless-1.1-SNAPSHOT.jar
>>> cd ..
>>> ./bin/catalina.sh run
>> 
>> (i know i could have done it faster ;))
>> 
>> - Romain
>> 
>> 
>> 2012/1/17 Mansour Al Akeel <mansour.alakeel@gmail.com>
>> 
>>> Thank you Romain,
>>> can you please let me know if this info is still correct?
>>> 
>>> As of 1.0 beta1, OpenEJB supports unpacked ejb jars. Simply meaning
>>> that you don't need to pack your ejb's into a jar file in order to use
>>> them in OpenEJB. You still need to follow the ejb jar layout and
>>> include an "META-INF/ejb-jar.xml" in the directory that contains your
>>> ejbs.
>>> 
>>> 
>>> 
>>> On Tue, Jan 17, 2012 at 11:46 AM, Romain Manni-Bucau
>>> <rmannibucau@gmail.com> wrote:
>>>> the current code doesn't handle directories, it can probably be enhanced
>>> in
>>>> next releases.
>>>> 
>>>> My second sentence referred to some application servers which need to
>>>> unpack all archives (even jar files) to scan them which is not our case.
>>>> 
>>>> - Romain
>>>> 
>>>> 
>>>> 2012/1/17 Mansour Al Akeel <mansour.alakeel@gmail.com>
>>>> 
>>>>> Romain, sorry but I didn't get your answer. Can you please kindly
>>>>> elaborate, and give some details ?
>>>>> What do I need to do to deploy and redeploy an unpacked jar ?
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, Jan 17, 2012 at 11:33 AM, Romain Manni-Bucau
>>>>> <rmannibucau@gmail.com> wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> it only manages file, not directory. But some files have not to be
>>>>> unpacked
>>>>>> for scanning.
>>>>>> 
>>>>>> - Romain
>>>>>> 
>>>>>> 
>>>>>> 2012/1/17 Mansour Al Akeel <mansour.alakeel@gmail.com>
>>>>>> 
>>>>>>> From this page:
>>>>>>> 
>>>>>>> http://openejb.apache.org/deployments.html
>>>>>>> 
>>>>>>> An unpacked jar
>>>>>>> 
>>>>>>> As of 1.0 beta1, OpenEJB supports unpacked ejb jars. Simply meaning
>>>>>>> that you don't need to pack your ejb's into a jar file in order
to
>>> use
>>>>>>> them in OpenEJB. You still need to follow the ejb jar layout
and
>>>>>>> include an "META-INF/ejb-jar.xml" in the directory that contains
your
>>>>>>> ejbs.
>>>>>>> 
>>>>>>> ===============================================================
>>>>>>> 
>>>>>>> Can someone please give me a step by step example. I am trying
this
>>>>>>> with one of the examples. It's not working:
>>>>>>> 
>>>>>>> 11:20:14 @ target $ pwd
>>>>>>> 
>>> /home/mansour/workspace/openejb-examples-3.1.2/simple-stateless/target
>>>>>>> 11:20:18 @ target $ openejb deploy myproject
>>>>>>> Unable to copy application to
>>>>>>> "/opt/Programs/openejb-3.1.4/apps/myproject".  Check that the
>>>>>>> directory is writable and that there is enough disk space.
>>>>>>> 11:20:23 @ target $ tree myproject
>>>>>>> myproject
>>>>>>> |-- META-INF
>>>>>>> |   |-- MANIFEST.MF
>>>>>>> |   `-- ejb-jar.xml
>>>>>>> `-- org
>>>>>>>    `-- superbiz
>>>>>>>        `-- calculator
>>>>>>>            |-- CalculatorImpl.class
>>>>>>>            |-- CalculatorLocal.class
>>>>>>>            `-- CalculatorRemote.class
>>>>>>> 
>>>>>>> 4 directories, 5 files
>>>>>>> 
>>>>>>> ===================================
>>>>>>> 
>>>>>>> This will be very good for development. If I can deploy/undeploy
>>>>>>> directories, it can be a time saver.
>>>>>>> Thank you.
>>>>>>> 
>>>>> 
>>> 


Mime
View raw message