Hey,

I'm no EJB master either, but I can answer your questions with what I do know.

1. Perfectly fine. If you run it in something like Geronimo, it's
basically just embedded in Geronimo. Your web server is nothing more
than a Java Application, and OpenEJB has 2 modes, Standalone and
Embedded (I think there is another one I can't recall). So you're just
initializing the OpenEJB application inside your VM, and have the same
stability/functionality provided in any other mode. In fact, I would
recommend doing this with OpenEJB any day.

2. How many EJBs do you have for it to take this long? If you have a
huge classpath you can try trimming down the search to only the
desired JARs. See:
http://openejb.apache.org/3.0/application-discovery-via-the-classpath.html.
Alternatively you can try and specify static bean configurations in
ejb-jar.xml. They would be something like this:

<?xml version="1.0" encoding="UTF-8" ?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"; version="3.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
         http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd";>
   <enterprise-beans>
      <session>
         <ejb-name>TestBean</ejb-name>
         <local>net.kunye.test.TestLocal</local>
         <remote>net.kunye.test.TestRemote</remote>
      </session>
      <session>
         <ejb-name>PersonnelBean</ejb-name>
         <local>net.kunye.platform.personnel.PersonnelLocal</local>
         <remote>net.kunye.platform.personnel.PersonnelRemote</remote>
      </session>
   </enterprise-beans>
</ejb-jar>

When you do this all the beans that are listed will be loaded from XML
(no annotation interpretation afaik) and the rest of the beans will be
loaded the normal way.

What you can do is perhaps hook in a compile-time task to generate
this list for you. If you already have such a file with other
configurations, you can perhaps make a template and generate the
ejb-jar.xml everytime you compile.

I'm not sure how much this will help. I've never really had to deal
with this problem. The most EJBs I've loaded was around 50 I think,
and it went quick. Some of the other guys might be able to help with
this.

Q


On Mon, Sep 7, 2009 at 2:01 PM, Vikrant Yagnick
<vikrant.yagn...@mastek.com> wrote:
> Hi All,
>
> We are creating a  "offline" version of an online application using Oracle 
> Lite, i.e. basically our J2EE application will work in a stand-alone mode on 
> a laptop with the embedded Oracle Lite database.
>
> Since, Oracle Lite comes in-built with it's own web-serve (WebToGo) we 
> decided to embed openEJB as our EJB container intra-vm so that we could 
> deploy our EAR as is. It works like a charm!!!
>
> I had a couple of questions(Sorry, we are new with openejb):
>
>
> 1)      Is it correct to use openejb in such a way, since it will be used in 
> production environments. (Any tips on tuning could help).
>
> 2)      OpenEJB builds up the application assembly everytime we start the 
> webtogo server(it is a disguised Oracle 10.1.3 Standalone OC4J Server) on the 
> client.  This does take 2-3 minutes due to the number of EJB's we have. Is 
> there a way for OpenEJB to persist this application assembly so that when it 
> startups a second time, it does not build the entire assembly again. This way 
> there will be no delay if the server has to be re-started.
>
> Cheers,
> Vikrant Yagnick
> Software Designer
> MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, 
> Mahape, Navi  Mumbai 400-710   |
> (T) 91 22 66952222 Extn - 5230 | Mobile: +919833490598 | www.mastek.com
>
> MASTEK LTD.
> Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
> In the US, we're called MAJESCOMASTEK
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Opinions expressed in this e-mail are those of the individual and not that of 
> Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
> does not accept any responsibility or liability for it. This e-mail and 
> attachments (if any) transmitted with it are confidential and/or privileged 
> and solely for the use of the intended person or entity to which it is 
> addressed. Any review, re-transmission, dissemination or other use of or 
> taking of any action in reliance upon this information by persons or entities 
> other than the intended recipient is prohibited. This e-mail and its 
> attachments have been scanned for the presence of computer viruses. It is the 
> responsibility of the recipient to run the virus check on e-mails and 
> attachments before opening them. If you have received this e-mail in error, 
> kindly delete this e-mail from desktop and server.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>



-- 
Quintin Beukes

Reply via email to