• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How deploy Java Main class as a service in Weblogic

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);

}
}

 
Ranch Hand
Posts: 98
Oracle Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ananddraj, I'll try to convert my main class into jsp.

Regards
Suzan
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic