it works perfect :-)

thanx!
ittay

On Thu, 2003-06-26 at 16:42, David Ward wrote:
> Ittay,
> 
> I know you want to initialize your beans; I am telling you how you can do it
> using a standard j2ee technique.
> 
> If you have an ear with an ejb-jar and a war in it (even if the war is just for
> this purpose), once your entire app is started up, the contextInitialized method
> will be called in your ServletContextListener.  It is in that method that you
> can get a handle on some local (or remote if you want) interfaces to your beans
> and do your initialization.  All this should happen as part of (the end of) the
> deploy of your app before traffic starts hitting it.
> 
> The above mechanism is 100% appserver-agnostic, and pure j2ee.  Using MBeans and
> <depends/> and stuff like that is not guaranteed to work on all appservers.
> 
> David
> 
> 
> Mensaje citado por Ittay Dror <[EMAIL PROTECTED]>:
> 
> > why use the web side of things? what i want to initialize is my beans.
> > ins't there a j2ee way of doing that?
> > 
> > thanx,
> > ittay
> > On Wed, 2003-06-25 at 15:51, David Ward wrote:
> > > Ittay,
> > > 
> > > Implement a javax.servlet.ServletContextListener, add it to your web.xml of
> > your
> > > war (if you have one, otherwise make one), and then you can put stuff in
> > the
> > > contextInitialized(ServletContextEvent) and
> > > contextDestroyed(ServletContextEvent) methods.  It's a good appserver
> > agnostic
> > > startup/shutdown hook mechanism.
> > > 
> > > David
> > > 
> > > 
> > > Mensaje citado por Ittay Dror <[EMAIL PROTECTED]>:
> > > 
> > > > Hello,
> > > > 
> > > > I want to be able to run some code that calls EJBs at the end of my ear
> > > > deployment. I've tried to do this by creating an MBean, and putting the
> > > > code in its start() method. My problem is that the MBean starts before
> > > > the EJBs are deployed. I've tried putting a <depends> on the object
> > > > names JBoss gives to these beans (in domain jboss.j2ee), but then the
> > > > code is called before JBoss is able to create the beans. There is
> > > > another way, which is to <depends> the MBean on the EJBModule. However,
> > > > JBoss recognizes this by the full path of the jars, which may change in
> > > > different computers.
> > > > 
> > > > Any help is appreciated,
> > > > Thank you,
> > > > Ittay
> > > 
> > > 
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: INetU
> > > Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> > > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> > > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > -- 
> > =======================================
> > Ittay Dror ([EMAIL PROTECTED])
> > User Space, R&D
> > Qlusters Inc.
> > Tel: +972-3-6081956 Fax: +972-3-6081841
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: INetU
> > Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> 
> 
> ---------------------
> David Ward
> [EMAIL PROTECTED]
> http://www.dotech.com
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
=======================================
Ittay Dror ([EMAIL PROTECTED])
User Space, R&D
Qlusters Inc.
Tel: +972-3-6081956 Fax: +972-3-6081841



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to