Could someone confirm if I can use Wildfly-servlet only distribution to do asynchronous Rest calls? Seems like JAX-RS injects an instance of AsyncResponse whenever it sees #Suspended AsyncResponse, but with Wildfly-servlet injection is not available. I am wondering if there is anyway around this.
No WildFly Servlet is essentially just Undertow with WildFly Core. You can only use servlets and JSP's.
You should be able to use it if you bundle Resteasy in your application.
Related
Recently I began working with Teiid and Wildfly. I have a user defined function (UDF) that adds custom functionality to Teiid, and it works as expected. However, I need to modify it further and would like to use CDI to inject a bean from the Wildfly app server. I know that the UDF isn't managed by the container (it is a Wildfly module with an associated module.xml file deployed as a jar), so I've added (what seemed to be) necessary dependencies to module.xml but it doesn't work.
Is it possible to use CDI in a UDF with Teiid / Wildfly, and if so, how?
No, it is not possible. although Teiid is a resident of WildFly it is using the infrastructure of WildFly for a variety of features like transactions, security, data sources, administration etc. It is not part of JEE or anything, so there is no direct way to do this. If you want to explain what you are trying to accomplish, maybe we can offer any further guidance on alternatives.
We were working on creating a RESTful service. We have thought of using frameworks like jersey or cxf. But apparently we found that just using the javax.ws.rs-api-2.0.jar and the related annotations, we can get the service working.
Question is:
How does it work? Is it dependent on the application servers?
What if we application server does not support or have the implementation of the API?
If it is dependent on application servers, can I find out the library which the server is using especially tomcat?
EDIT 1
This question is invalid. javax.ws.rs-api-2.0.jar is just an API. Using this jar does not suffice. It will not give compilation errors.
But at run-time, you need providers which will implement the rs-api. And thus we need the frameworks like jersey or cxf.
In our application, these jars were added to the war during ant-build from external location and that is why it confused us.
I am closing this question.
I am using Jboss5.1 and I have a EAR1 deployed which has a EJB3 component implemented using #Stateless annotation and the same EJB is also exposed as webservice using the annotation #webservice.
I want to check through a EJB service/management service bean(Packaged in another EAR2) from the start of deployment to un-deployment of EAR1 PERIODICALLY, if the EJB and Webservice is deployed and running properly and working normally and is not in deadlock/non responsive state.
I have looked into JMX and I am able to get notifications of create and destroy for EJB as well as webservice, but how to check periodically whether the EJB and webservice is working normally and is not in deadlock/non responsive state?
Also how to monitor Jboss ESB services?
Is the JMX is the only way or does jboss provides any other API's to do monitoring how about JBOSS MONITORING
Thanks in advance if you are looking at this.
Especially JBoss AS5.x is using the so called profile service (PS) as the main way to interact with the server. Unfortunately the PS is not JMX-based and on the other side you don't see all EJBs in the Platform MBean server.
RHQ has a plugin to monitor EJB instances inside AS5 as well as for other resource types like JBoss ESB or Apache Tomcat and is able to determine the availability of EJBs.
but how to check periodically whether the EJB and webservice is
working normally and is not in deadlock/non responsive state?
This is usually something that you can (only)(*) determine by hitting the relevant beans/methods and evaluating the outcome.
*) It may be possible to determine a bean in a deadlocked state by requesting a heap dump and looking for deadlocked periodically.
I have an application using Apache CXF with a lots of SOAP services implemented. So, i would like to use the "service registry" concept and then, i´d hear about UDDI, but i dont know how to implemented that.
Is Apache CXF already composed by an API to deploy UDDI engine or should i fix another library to do that?
Take a look at JUDDI:
http://juddi.apache.org/
which is a UDDI service. The latest version is written to JAX-WS and is tested by default with CXF.
To add, jUDDI has a neat way to automate the registration of web services using annotations and a servlet startup listener.
Source: http://svn.apache.org/repos/asf/juddi/trunk/juddi-examples/uddi-annotations/
I am new to Java EE 6 and working on getting a number of demo applications running finally.
I have an application scoped bean that has a #Schedule annotation on it that should in theory trigger that method every minute. However, that method doesn't appear to ever be invoked. It simply writes to the logs that it was called.
Can I use EJB3.1 on embedded glassfish? Do I need to do anything special to make it work?
Walter
(...) However, that method doesn't appear to ever be invoked. It simply writes to the logs that it was called.
Hmm... What?
Can I use EJB3.1 on embedded glassfish? Do I need to do anything special to make it work?
Embedded GlassFish is like a full GlassFish, there are no restrictions. So you can use EJB 3.1 with the full Java EE profile imeplementation and you can use EJB 3.1 Lite with the Web Profile implementation. I'm not sure #Schedule is part of EJB 3.1 Lite tough.