This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Startup Class application  RSS feed

Balaji Saranathan
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am new to EJB world ..sorry if this is very primitive.
I have written a application that I specify in the WebLogic Server's startup class.
This application opens up a port and listens for the request and sends back a response.
Now My question is all the components are specified to be in some kind of J2EE containers.
If that is the case, where does this class fit into?? Is it present in a appilcation client container???
Tim Holloway
Posts: 18705
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might be able to find a place for it in an EAR file - check the WebLogic docs.
However, a "true" webapp doesn't have a place for the WebLogic startup class - "true" webapps are server-independent (well, theoretically), and the WebLogic startup class is not.
Actually, as far as I've been able to tell, there's nothing that can be done these days in a WebLogic startup class that can't be done with a (for lack knowing better term) "null servlet". Such as servlet has the following properties:
1. Set to run at server startup, not on an HTTP request
2. doGet/doPost &co. simply return "illegal request" status.
3. Spawn server process threads in the servlet's init() method - DON'T run init directly as a server - the appserver may hang while it waits for you to return from init().
This trick is often used to do such things as establish a database connection pool, network connections, or obtain other resources useful to the webapp. You can then store references in the application context - something may be a little more difficult in the WebLogic startup class.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!