Comments (11)
Hi @marciodel ,
Can you provide some minimal example, then I'll check.
Isn't it sufficient when the package (jar/zip) you create contains META-INF/beans.xml?
Thanks!
from jrestless.
Hi @bbilger,
I have included "org.jboss.weld.se:weld-se-core:2.4.2.SP1" and "org.glassfish.jersey.ext.cdi:jersey-weld2-se:2.25.1" in my project dependencies .
In the request handler I have added Weld initialization.
Weld weld = new Weld();
weld.initialize();
config = new JAXRSApplication().register(GatewayFeature.class);
init(config);
start();
Adding META-INF/beans.xml in each .jar made it work. I've dowloaded the project and made the changes to include it.
I'm not a CDI expert, just a regular user. :) But what I've understood is that Weld (I don´t know about other CDI implementation) scans the .jar implementations that contains the META-INF/beans.xml.
Best regards
from jrestless.
Hi @marciodel ,
Thanks!
I am a little busy at the moment but I will try to take a look as soon as possible.
from jrestless.
Just a remark. I am deploying to AWS lambda a zip file containing a lib folder with the dependencies inside it.
my.zip:
com/
...
lib/
*.jar
from jrestless.
Thanks!
Take your time. I have managed to make my project work with those changes.
Congratulations for this great project!
from jrestless.
I think I found the issue: the filters injected the request using @Inject which does not seem to work when using CDI/Weld (http://stackoverflow.com/questions/13419887/injection-of-httpservletrequest/13420108#13420108). So I switched to inject it using @context (I used @Inject by mistake).
As far as I can see so far we do not need to have a beans.xml in every module.
(I hope to be finally able to release JRestless 0.5.0 at the end of this week or at the beginning of next week; I will provide an example for CDI afterwards - will leave the bug open until then)
from jrestless.
Hi @marciodel ,
I just released 0.5.0 including this fix and added a CDI/Weld example: https://github.com/bbilger/jrestless-examples/tree/master/aws/gateway/aws-gateway-cdi
Hope this solves your problem!
from jrestless.
assuming fixed - if not, then please re-open
from jrestless.
Hi bbilger, sorry for the delayed answer. I was on vacation. I'll test it and provide a feedback as soon as possible. Thanks!
from jrestless.
I've tested with the version 0.5.1 and it is working flawlessly.
Thanks!
from jrestless.
Hi @marciodel ,
thanks for the feedback.
from jrestless.
Related Issues (20)
- Problem serializing Response when deployed to AWS Lambda HOT 7
- Question - Run dropwizard applications with jrestless on aws lambda HOT 1
- Use RequestAndBaseUri in SNS and Service Functions
- Add CORS Filter
- Contribute HOT 3
- DefaultGatewayRequest declared as final does not work with CDI HOT 1
- onRequestFailure is never called HOT 3
- CHANGELOG not updated for 0.5.0 HOT 2
- Add IAM Security Filter and Principal
- Examples: Add cognito oauth integration HOT 2
- clarify logging support HOT 2
- Can I use both SNS trigger and API Gateway in same application? HOT 2
- exceptions' stacktraces do not include the first line HOT 5
- Add support for Azure HOT 3
- jrestless incompatible with jersey 2.26 HOT 3
- Add support for Project Fn HOT 2
- Upgrade To JUnit 5
- Progress on dropwizard applications with jrestless on aws lambda? HOT 1
- Running locally HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jrestless.