TrainBeaser for iPhone
The moose likes BEA/Weblogic and the fly likes How deploy Java Main class as a service in Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "How deploy Java Main class as a service in Weblogic " Watch "How deploy Java Main class as a service in Weblogic " New topic
Author

How deploy Java Main class as a service in Weblogic

Suzan Ntsimane
Greenhorn

Joined: Feb 04, 2012
Posts: 2
Greetings,

I'm new into Java and Weblogic and my company tasked me to port Notification Services that were written in Delphi into Java and Weblogi Server.

I wrote Java Application using Java Task Timer on the main class and below is example of my main class:

How do i deploy this on a weblogic server...?Please advice I dont have clue where to start. I read about WSDL and EJBs but I stucked because I created just a simple swing with a Main class.


import java.util.Timer;
import java.util.TimerTask;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
import org.hibernate.*;
import org.hibernate.cfg.Configuration;
import org.hibernate.classic.Session;
import org.apache.log4j.*;

public class MainProject
{
static Logger log = Logger.getLogger(
MainProject.class.getName());


public static void main( String[] args ) throws Exception
{
int StartTime= 10000; //Start Time
int delayBetweenExec = 6000; //Delay Time

Timer timer = new Timer();
timer.schedule(new TimerTask()
{
@Override
public void run()
{
MailMail.SendUnsentEscaltion();
}
},StartTime, delayBetweenExec);

}
}

anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 80

Hi Suzan,

You can make the class as a JSP, Servlet and make a WAR out of it and then deploy on to the server.

If you want to convert it into a WebService. You can refer the below link for a sample illustration.

http://weblogic-wonders.com/weblogic/2011/05/19/webservices-in-weblogic/

Cheers,
Anandraj


Regards,
Anandraj
http://weblogic-wonders.com/
Suzan Ntsimane
Greenhorn

Joined: Feb 04, 2012
Posts: 2
Thanks Ananddraj, I'll try to convert my main class into jsp.

Regards
Suzan
 
 
subject: How deploy Java Main class as a service in Weblogic
 
Threads others viewed
Client/server application using CORBA
how to execute thread on linux web server?
TIMER CLASS
Countdown timer in java
Create multiple Servants/objects
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture