[Installation, Configuration & DEPLOYMENT] - deploying a scheduled service
by gasper_k
Hi,
I'm using JBoss 4.2.1 GA and I'm trying to deploy a singleton service bean into a cluster and I've found three ways to do it:
1) deploy as a true HA singleton (didn't manage to get it to work),
2) deploy through a .sar archive with jboss-service.xml descriptor with a HASingletonDeployer Barrier dependency (the service gets created on each node, but only starts on one, which seems to work fine),
3) deploy with .jar and @Service annotation, without a descriptor file (works fine, only one node creates and starts the service).
Next, I want to add a scheduler that would call this singleton service on specified intervals. If I go with no. 2, it works fine, I add a SchedulerProvider with dependency on my mbean and also on HASingletonDeployer Barrier, so that the scheduler also only runs on one node.
This works fine, but I'm trying to deploy the service as described in no. 3. I'd have to rename the file to .jar, since @Service annotation doesn't get picked up if it's present inside a .sar archive, so the service isn't started and the scheduler reports a dependancy error (of course). I'd prefer to deploy my service as a "true" service, not simulate it via singleton-barrier dependency.
So; how can I deploy a @Service and a scheduler at the same time? I can't find any annotations for scheduling. I've searched around quite a lot, but can't find The Answer.
Perhaps I'm going the wrong way about it, but I need some sort of a singleton timer that would serve as the main job manager that would delegate work to specific beans in the cluster -- scheduled calls to clustered downloading, log processing, and such.
Thanks and best regards,
Gasper
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075854#4075854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075854
18Â years, 10Â months
[JBoss Seam] - Registration example not working with SEAM-2.0.0.BETA1 and A
by cfthomas
Hi!
I just downloaded and extracted:
JBoss Application Server 4.2.1.GA
and
JBoss SEAM 2.0.0.BETA1
then I tried running the test for example/registration:
cd examples/registration
ant testexample
I get the following error:
[testng] [Parser] Running:
| [testng] /Users/thomas/dev/jboss-seam-2.0.0.BETA1/examples/registration/src/org/jboss/seam/example/registration/test/testng.xml
|
| [testng] WARN 20-08 15:40:50,885 [org.jboss.mx.loading.UnifiedLoaderRepository3.addClassLoader():675] Tried to add non-URLClassLoader. Ignored
| [testng] INFO 20-08 15:40:54,196 [com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService():126] JBossTS Transaction Service (JTA version) - JBoss Inc.
| [testng] INFO 20-08 15:40:54,205 [com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService():128] Setting up property manager MBean and JMX layer
| [testng] WARN 20-08 15:40:54,399 [com.arjuna.ats.arjuna.coordinator.TxControl.<clinit>():266] [com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using -53edfeca:c11e:46c999e6:0
| [testng] INFO 20-08 15:40:54,576 [com.arjuna.ats.arjuna.recovery.TransactionStatusManager.addService():110] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_1] - Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 49438
| [testng] INFO 20-08 15:40:54,604 [?.?():?] TransactionStatusManagerItem - host: 172.18.1.54 port: 49438
| [testng] INFO 20-08 15:40:54,648 [com.arjuna.ats.arjuna.recovery.TransactionStatusManager.start():161] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_3] - TransactionStatusManager started on port 49438 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
| [testng] INFO 20-08 15:40:54,693 [?.?():?] Registering mbean for module 'arjuna'
| [testng] INFO 20-08 15:40:54,712 [?.?():?] Initialising JMX agent com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl
| [testng] INFO 20-08 15:40:54,792 [com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService():163] Starting recovery manager
| [testng] INFO 20-08 15:40:54,848 [?.?():?]
| [testng] --- Start RecoveryActivators
| [testng] INFO 20-08 15:40:54,895 [com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple.<init>():142] [com.arjuna.ats.internal.arjuna.recovery.ready] RecoveryManagerImple is ready on port 49.439
| [testng] INFO 20-08 15:40:54,898 [com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService():168] Recovery manager started
| [testng] INFO 20-08 15:40:54,906 [com.arjuna.ats.jbossatx.jta.TransactionManagerService.startService():191] Binding TransactionManager JNDI Reference
| [testng] INFO 20-08 15:41:01,836 [org.jboss.jms.server.ServerPeer.<init>():187] ServerPeer[0] creating server peer with ID 0
| [testng] FAILED CONFIGURATION: @BeforeClass init
| [testng] org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
|
| [testng] jboss.jca:name=DefaultDS,service=DataSourceBinding
| [testng] -> jboss.jca:name=DefaultDS,service=LocalTxCM{Create:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=LocalTxCM{Start:Configured}
|
| [testng] jboss.jca:name=DefaultDS,service=LocalTxCM
| [testng] -> jboss.jca:name=DefaultDS,service=ManagedConnectionPool{Create:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=ManagedConnectionPool{Start:Configured}
|
| [testng] jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
| [testng] -> jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment{Start:** NOT FOUND **}
| [testng] -> jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment{Create:** NOT FOUND **}
|
| [testng] jboss.jca:name=DefaultDS,service=ManagedConnectionPool
| [testng] -> jboss.jca:name=DefaultDS,service=ManagedConnectionFactory{Create:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=ManagedConnectionFactory{Start:Configured}
|
| [testng] jboss.jca:name=JmsXA,service=DataSourceBinding
| [testng] -> jboss.jca:name=JmsXA,service=TxCM{Start:Configured}
| [testng] -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}
|
| [testng] jboss.jca:name=JmsXA,service=ManagedConnectionFactory
| [testng] -> jboss.jca:name='jms-ra.rar',service=RARDeployment{Create:** NOT FOUND **}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.jca:name='jms-ra.rar',service=RARDeployment{Start:** NOT FOUND **}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
| [testng] jboss.jca:name=JmsXA,service=ManagedConnectionPool
| [testng] -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Start:Configured}
| [testng] -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}
|
| [testng] jboss.jca:name=JmsXA,service=TxCM
| [testng] -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}
| [testng] -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Start:Configured}
|
| [testng] jboss.messaging.connectionfactory:service=ConnectionFactory
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
|
| [testng] jboss.messaging.destination:name=DLQ,service=Queue
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
| [testng] jboss.messaging.destination:name=ExpiryQueue,service=Queue
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
| [testng] jboss.messaging.destination:name=PrivateDLQ,service=Queue
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
|
| [testng] jboss.messaging.destination:name=PrivateExpiryQueue,service=Queue
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
| [testng] jboss.messaging.destination:name=QueueWithOwnDLQAndExpiryQueue,service=Queue
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
|
| [testng] jboss.messaging.destination:name=QueueWithOwnRedeliveryDelay,service=Queue
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
|
| [testng] jboss.messaging.destination:name=TopicWithOwnDLQAndExpiryQueue,service=Topic
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
|
| [testng] jboss.messaging.destination:name=TopicWithOwnRedeliveryDelay,service=Topic
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Create:Configured}
| [testng] -> jboss.messaging:service=PostOffice{Start:Configured}
|
| [testng] jboss.messaging:service=JMSUserManager
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
|
| [testng] jboss.messaging:service=PersistenceManager
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}
|
| [testng] jboss.messaging:service=PostOffice
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:Configured}
| [testng] -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
| [testng] jboss.messaging:service=ServerPeer
| [testng] -> jboss.messaging:service=PersistenceManager{Start:Configured}
| [testng] -> jboss.messaging:service=JMSUserManager{Start:Configured}
| [testng] -> jboss.messaging:service=JMSUserManager{Create:Configured}
| [testng] -> jboss.messaging:service=PersistenceManager{Create:Configured}
|
| [testng] jboss.mq:service=DestinationManager
| [testng] -> jboss.messaging:service=ServerPeer{Start:Configured}
| [testng] -> jboss.messaging:service=ServerPeer{Create:Configured}
|
|
| [testng] *** CONTEXTS IN ERROR: Name -> Error
|
| [testng] jboss.jca:name='jms-ra.rar',service=RARDeployment -> ** NOT FOUND **
|
| [testng] jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment -> ** NOT FOUND **
|
|
| [testng] at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
| [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
| [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:919)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:856)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] ... Removed 22 stack frames
| [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
| [testng] SKIPPED CONFIGURATION: @AfterMethod end
| [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
| [testng] SKIPPED: testLogin
|
| [testng] ===============================================
| [testng] Register
| [testng] Tests run: 1, Failures: 0, Skips: 1
| [testng] Configuration Failures: 1, Skips: 3
| [testng] ===============================================
|
|
| [testng] ===============================================
| [testng] Registration
| [testng] Total tests run: 1, Failures: 0, Skips: 1
| [testng] Configuration Failures: 1, Skips: 3
| [testng] ===============================================
|
|
| BUILD SUCCESSFUL
| Total time: 21 seconds
|
I'm currently evaluating JBoss Seam should I choose Seam 1.x or do I need AS 4.0?
Thank you,
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075853#4075853
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075853
18Â years, 10Â months
[JBoss Seam] - MSSQL Integration with SEAM/Tomcat 5.5
by juergenmelzer
Hi there everyone,
I tried my helloworld example from Michael Yuan's book, which does work under Tomcat 5.5 and HSQL-DB, to configure for MS SQL Server.
Im am working with Seam 1.2.1.GA.
My MS SQL Server driver is the current driver from Microsoft (sqljdbc.jar) for MSSQL 2000/2005 and used to work pretty well. I copied that file to the WEB-INF/lib directory.
Since DB Configuration takes place in the jboss-beans*.xml files, I changed my jboss-beans.xml to the following:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://localhost:1433;databaseName=tomcatejb3;user=sa;password=sa;
sa
sa
java:/DefaultDS
0
10
1000
100000
================================================
My persistence.xml looks like this:
<persistence-unit name="helloworld">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>java:/DefaultDS</jta-data-source>
</persistence-unit>
================================================
Im am using a very easy facelets page, named test.jspx:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib"
version="2.0">
<ui:composition>
<h:inputText value="#{test.text}"></h:inputText>
</ui:composition>
</jsp:root>
================================================
This page uses an Controller (testimpl.java) class, which looks like that:
import static javax.persistence.PersistenceContextType.EXTENDED;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Name;
@Stateful
@Name("test")
public class testimpl implements test {
String text;
@PersistenceContext (type=EXTENDED)
private EntityManager em;
public String getText()
{
String s;
s = (String)em.createQuery("select MIN(p.name) from Person p").getSingleResult();
//s = "test";
return s;
}
@Remove @Destroy
public void destroy() {}
}
================================================
This class ist derived from the interface test.java:
import javax.ejb.Local;
@Local
public interface test
{
public String getText();
public void destroy ();
}
================================================
When I try that, I receive following message:
org.jboss.seam.InstantiationException: Could not instantiate Seam component: test
Complete trace:
SCHWERWIEGEND: Error Rendering View[/test.jspx]
org.jboss.seam.InstantiationException: Could not instantiate Seam component: test
at org.jboss.seam.Component.newInstance(Component.java:1740)
at org.jboss.seam.Component.getInstance(Component.java:1643)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:100)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:829)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:894)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.naming.NameNotFoundException: testimpl not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
at org.jboss.seam.Component.instantiate(Component.java:1093)
at org.jboss.seam.Component.newInstance(Component.java:1736)
... 48 more
================================================
I really had a hard time finding out how to configure my seam application for Tomcat/MSSQL and never got it to run.
I really appreciate any help on that issue.
I right now need to get a project going, this is just the beginning...
So I need to find the missing puzzle asap.
Thanks for everything,
J. Melzer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075849#4075849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075849
18Â years, 10Â months
[JBossWS] - Re: JAX-WS from Sessions Bean fails due to missing org/jboss
by tschwarz
I had similar classpath problems, when I added the JBoss JAX-WS jars to the server. I guess that has something to do with mixing the JDK6 JAX-WS implementation with the JBoss JAX-WS implementation.
But if you want to invoke a web service from a stateless session bean you don't need to do that.
If you are using JBoss 4.2 and EJB3 you can do it like that:
1. Use the wsconsume tool (in JBoss/bin directory) to generate your web service class files from your wsdl file.
2. Add these files to your classpath.
3. Write a stateless session bean like that:
@Stateless
| public class WSInvoker
| {
| // Replace MyWebService with your generated web service class name here
| @WebServiceRef
| private static MyWebService service;
|
| public void invokeWS()
| {
| MyEndpoint entpoint = service.getEndpoint(MyEndpoint.class);
| // invoke the endpoint's buisness methods
| }
| }
I hope I could help you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075848#4075848
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075848
18Â years, 10Â months