I am building a web service using seam 2.0.1 GA and deploying it on jboss 4.2.2 GA. I have my web service class which access another class(updates stuff in data base).
I have standard-jaxws-endpoint-config.xml in META-INF folder.
@Name("pluginHandler")
@Scope(ScopeType.APPLICATION)
@Install(precedence = Install.BUILT_IN)
@Startup(depends = "someclass")
@Stateless
@WebService(name = "Plugin", serviceName = "PluginService")
public class PlugInHandler {
@WebMethod
public int processRequest(Account account)
{
Workbench wb = Component.getInstance("Workbench");
//above line keeps throwing exception "No application context active"
}
}
I have been looking all over different forums , but i cannot find a solution. i tried using Lifecycle.begincall() and Lifecycle.endCall() ..but nothing worked.
Do i need web.xml as well? If yes what information should web.xml contain??? Any help would be highly appreciated.
Thanks
First of all, you're mixing a lot of stuff together. Why do you put @startup on the class ?
If it is just a webservice, then remove @startup (and also @install), then it should work.