File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
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: 98

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
Follow us on facebook:
https://www.facebook.com/weblogicwonders
Suzan Ntsimane
Greenhorn

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

Regards
Suzan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How deploy Java Main class as a service in Weblogic
 
Similar Threads
TIMER CLASS
how to execute thread on linux web server?
Client/server application using CORBA
Create multiple Servants/objects
Countdown timer in java