Hi ,
Can any body tell me who weblogic startup classes works .
My requirment is , i want to write a own class having a Hashtable ( where i will put some my appilication specific property ) and use this as a start up class . So far how to regiter the startup class is almost known to me . But how to access the instance of that class from my EJB and Servlet
-
Weblogic startup class (5 messages)
- Posted by: Ashim Chakraborty
- Posted on: March 27 2001 05:33 EST
Threaded Messages (5)
- Weblogic startup class by muthu swamy on March 27 2001 17:17 EST
- Consider using WebLogic Workspaces by Trond Arve Wasskog on March 28 2001 05:54 EST
- Weblogic startup class by Richard Kenyon on March 28 2001 09:25 EST
- Singletons are evil in the J2EE world :) by Trond Arve Wasskog on March 28 2001 11:35 EST
- Weblogic startup class by Tony Brookes on April 12 2001 00:17 EDT
-
Weblogic startup class[ Go to top ]
- Posted by: muthu swamy
- Posted on: March 27 2001 17:17 EST
- in response to Ashim Chakraborty
hi,
upto my knowledge, you can access it using this....i suppose...
(startupclassinpackage)Naming.lookup("http://yourservername:7001/"+startupclassinpackage);
bye
muthu -
Consider using WebLogic Workspaces[ Go to top ]
- Posted by: Trond Arve Wasskog
- Posted on: March 28 2001 05:54 EST
- in response to Ashim Chakraborty
If your requirement is to store and share data across sessions, consider using a WebLogic Workspace, see Using WebLogic Workspaces. You can assign different scopes to workspaces (client, group, server, cluster). -
Weblogic startup class[ Go to top ]
- Posted by: Richard Kenyon
- Posted on: March 28 2001 09:25 EST
- in response to Ashim Chakraborty
If your application data you want to store is 'read-only', consider setting up a Singleton class within the startup class that stores your data.
This could then accessed using a class.getInstance().getData() type syntax.
Cheers,
Rick
-
Singletons are evil in the J2EE world :)[ Go to top ]
- Posted by: Trond Arve Wasskog
- Posted on: March 28 2001 11:35 EST
- in response to Richard Kenyon
Singletons are not recommended in the J2EE-universe. They contain static variables, use thread synchronization, no clustering and fail-over support, and the appserver may use several classloaders (and even JVMs) to load the Singletons.
That said, Singletons work with the current versions of WebLogic ;-) -
Weblogic startup class[ Go to top ]
- Posted by: Tony Brookes
- Posted on: April 12 2001 00:17 EDT
- in response to Ashim Chakraborty
That's not really what start up classes are for.
They are for performing start up operations. For instance, you might initialize and configure some static properties of some classes in this single threaded startup mode, and then let lots of threads run through your code without synchronization.
You don't really want the class to be available after it's run. (I assume we are talking about T3StartupDef here.)
If you want some form of config to be available then publish it to JNDI within your startup class.
Alternatively, the Workspace option will also work.
Chz
Tony