On Wednesday, January 2, 2019, 4:35 PM, Matej Novotny <manovotn@redhat.com> wrote:
Hello Karen,
Is your code public on GitHub (or somewhere else)?
It would be easier to try and help you if I could see the code.
From just the description I don't really understand how do you leverage CDI in your design and which bits work and which don't.
Regards
Matej
----- Original Message -----
> From: "Karen Goh" <karenworld@yahoo.com>
> To: weld-dev@lists.jboss.org
> Sent: Monday, December 24, 2018 11:26:38 AM
> Subject: [weld-dev] Clarification needed for using WELD CDI
>
> Hi,
>
> I am a beginner in WELD CDI and my purpose of this email is to clarify if
> WELD CDI can be used in this scenario.
>
> Basically, I started out my web app project using Java, JEE and jsp and DAO
> design.
>
> The thing is I have problem in getting the id of an entity.
>
> So, my question is how do I use Weld to get the Id and then used it in my
> DAOimpl ?
>
> I have a insert(Tutor t) method in tutorDAOImpl.
>
> Once the tutor's data is inserted into MYSQL the id is in as well cos it is
> using Autoincrement.
>
> So, I'm thinking of how to use Weld to get the tutor Id since I have the
> getter in tutor_id in Tutor class.
>
> In this DAO design, there is also a Manager or Service class which call the
> tutorDAOImpl's method and it is in turn called by the Controller.
>
> If Weld CDI can be used in my case, please tell me how to go about
> implementing it.
>
> Thank you & regards,
> Karen
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>