File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How deploy Java Main class as a service in Weblogic

 
Suzan Ntsimane
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
Oracle Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Suzan Ntsimane
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic