I'm trying to implement a inbound resource adapter which will receive a data through HTTP protocol. I have two variants of implementations: to use Jetty as inner server and to use web container from WildFly. I know how to use Jetty, but think that Undertow using is the best. But how? WildFly does not see @WebServlet in RAR. How can I tell to WildFly to deploy a servlet which is located RAR?
How to use HTTP protocol in Resource Adapter in WildFly
165 views Asked by Alexander Fedyukov At
1
There are 1 answers
Related Questions in SERVLETS
- java ee jdbc jstl servlet connection to db
- IOException parsing XML document from ServletContext resource What throws this exception in my SpringBoot RESTweb service?
- How can i connect my 4 objects in my jsp file so it can run perfectly
- Best Practice to skip URL pattern's from getting applied servlet filter
- How to accurately replace scripts / html before saving data from servlet to database
- Servlet not displaying data obtained from dao
- flutter Multipart file upload server side error: Unable to process parts as no multi-part configuration has been provided
- Read an image file using okhttp3.RequestBody in java and send it to client using HTTPServletResponse
- Unexpected servlet config parameter contextConfigLocation=<NONE>
- The servlets named [ClassName] and [com.example.ClassName] are both mapped to the url-pattern [/ClassName] which is not permitted
- How to Use an External JAR Offline in a Maven Project for Servlets Without Internet Access?
- session.invalidate() is sometimes not working and not destroying the session object. What should I do?
- Database ConnectionError
- In a web.xml, can the url-pattern of servlet-mapping containing more than one path component? (e.g. /path/to/*))
- How to update the resource property using the valuemap in the Sling servlet?
Related Questions in WILDFLY
- what are the benefits of deploying a spring boot application on an application server?
- What's the point of deploying spring boot application on an application server like Wildfly?
- Keycloak 15.0.1 failed to start because of missing library
- JBoss Wildfly 17 server not accessible via the hosting laptop's IP address
- Facing [io.undertow.request.io] (default task-4) Exception handling request to /business-central/: java.io.IOException: UT010029: Stream is closed
- How to get the current number of in-use bean instances (MDB) from Wildfly?
- Wildfly runs properly but wars Faile
- Retreiving a deployment from Wildfly using Docker and Uploading into Nexus
- Deployment Discrepancy: .war File Deployment from Nexus to Wildfly via Docker Image
- Problem configuring messaging-activemq in bootable wildfly 25
- How to set a reverse proxy with Undertow
- Attempting to start WildFly 10 causing a InvocationTargetException
- I want to access a password stored in a elytron credential store using system properties in jboss eap 7.4 version
- WildFly primefaces Fileupload customization (Encrypted tempFile)
- Error deploying .war from Nexus to Wildfly 29.0.1.Final via Docker
Related Questions in JCA
- Where can I download ECI resource adapter (cicseci.rar). Unable to find out it in IBM portal
- jboss.jca.common.api.validator.ValidateException: IJ010075: The resource adapter metadata must contain either an outbound or inbound configuration
- injection of connection factory in wildfly
- MDB listening to IMAP server throws an exception: EndpointFactory is currently not available
- How to get hold of the cause of the PKIX path building failed Exception
- Deploy Jackrabbit jca 2.21.15 on Wildfly 27
- How to create a JCA adapter in Jakarta EE 9?
- Decrypt file in java that was encrypted with openssl
- Is DESKeySpec insecure?
- Spring 5.3 deprecates CciTemplate
- Open Liberty 21.0.0.07 JMSActivation spect "Active" connections in the queue. There are two active connections in parallel and I want to limit to 1
- How do I programmatically install a certificate to the windows personal certificate store using Java?
- Deploying an MDB to listen to Kafka on Wildfly erros: WFLYEJB0383: No message listener of type fish.pay....KafkaListener found in resource adapter
- JCA Outbond MessageEndpoint size
- Open Liberty JMS with ActiveMQ jmsActivationSpec not triggering
Related Questions in INBOUND
- Beyondcode Laravel mailbox with postmark returns HTTP status code of 405
- Twilio Dev Phone Plugin Issues during installation
- Spring boot Request and response in two different APIs
- Amazon SP API print item label
- Event Webhook : GET parameters in URL
- How to open port on EC2 to allow api requests from external ips
- how to limit inbound in v2ray to a single device
- How to capture no response from user in inbound sms with python in twilio to then exit the inbound and then send an outbound sms message?
- Windows Firewall: Inbound rule. Randomly generated program path
- After added the user IP in inbound traffic(access restriction) of app service in azure, those IP user still cannot access the website
- How to define a translator for an Integration Object Item Attribute -Hybris
- Need to modify request payload in Azure APIM set body to send modified request body to BE
- Sendgrid Inbound Webhook - Undelivered notification
- Azure API Extract <send-request> policy's response status code
- NoMethodError in Rails::Conductor::ActionMailbox::InboundEmailsController#create + RubyonRails 6
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
When it comes to the point where the whole ecosystem is against me, I usually ask myself whether I'm sure the whole idea is right. Your idea does not seem to be right at all. Still, if you're sure, I'll explain the way of doing something that is close to what you want.
The idea of using servlet inside a resource adapter is a bit odd. Implementing an inbound HTTP adapter is odd either. In some logical sense, servlet container is an inbound HTTP resource adapter itself. It doesn't really utilize JCA container, but it's quite close to what an inbound resource adapter would stand for.
Another reason for not doing so is that resource adapters and application deployments have quite different life cycle. While WAR/EAR deployment represents an application which 'serves as it lives', the RAR semantic is quite different: instead of doing some business logic, resource adapter just provides interfaces for other deployments. You can bundle RAR into your EAR for sure, but if you're not targeting a monstrous monolith, you'll end-up deploying RAR as a separate artefact for your applications to use. Resource adapter should not contain any particular business logic. If you need it to do so, consider rethinking whether you need an application server at the first place: JCA container is quite poor comparing to EJB and Web ones, and if you don't need all the power, Java SE might come in handy.
Now, if you're still 100 % sure you need this, let's take a look at your options:
You may try to implement ServiceActivator -- a JBoss-specific start point for custom extensions. From within this activator you can access UndertowService and perform servlet container bootstrap manually. Here is an example of SA-powered artefact from Wildfly team. Since your question is quite unusual, I cannot confirm whether JCA deployment will support it, but it seems to.
If you cannot just force Wildfly's web container to process RAR deployment, you could fall back to a manual container instantiation. Undertow itself is just a module inside Wildfly so you can access it by specifying module dependency clause in your RAR's JAR manifest like so:
Undertow's classes will then be available to you upon deployment through your classloader and you'll be able to instantiate a new server with custom servlets inside.