Deploying Java Application(Main Class) over Weblogic

痴心易碎 提交于 2019-12-11 04:33:32

问题


I have a Java Application consisting of a Main Class and Java Proxies(Created using Axis 1.4).There are no Servlets or JSP`s

The program takes i/p from an excel sheet.Queries an internet application using Webservices.This process continues until all the records in the Excel have been executed.

Now my First question is how do I deploy this application on Weblogic:As a WAR, EAR or JAR(Not as WAR ofcourse) If it is a web application we can invoke it by a path like

http://server:port/contxt_root/abc.jsp

but this aint a web application, so how would I invoke it. In Jdevloper I right Click on Main Class, Click RUN and it starts executing.Now I have to deploy over a Weblogic Server in a Linux System

Second Question: How do I shedule it.Suppose if i want it to run weekly or daily.


回答1:


For this, you don't need any kind of web related servers, but some kind of a task scheduler, like cron to schedule a command line starting your Java application

You can run your compiled classes too, I'd advise to create a JAR file of them, that makes things a lot more clean.




回答2:


You could make your program a timer EJB: http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html

Just note that Java EE entities don't work to well with local files, so you need to consider where your excel sheet is located.

I'm not so sure you need to make it a Java EE app, just a scheduled program.

Good luck



来源:https://stackoverflow.com/questions/15160967/deploying-java-applicationmain-class-over-weblogic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!