Hi, I solved the problem of the topic with your suggestions. Now if I put
some console prints in the LoginController's methods, I can read them in
console, so basically the bean is working. Now my next step will be to find
out why the web page does not say anything about username and password,
Surprises? Interesting! Please do tell/clarify/elaborate or provide some
examples of surprises.
So far, I have not seen any surprises at all.
Okay, never mind. I took the liberty to search google for:
static Logger logger = LoggerFactory
and found this[1], which makes it abundantly clear why I
more to share, below.
On Mon, Jan 13, 2014 at 7:06 AM, Howard W. Smith, Jr.
smithh032...@gmail.com wrote:
Okay, never mind. I took the liberty to search google for:
static Logger logger = LoggerFactory
and found this[1], which makes it abundantly clear why I should define the
logger as
well both are true so as usual the conclusion is depend on your
case. BTW static is almost always fine in practise for standard apps.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github:
/questions/21017979/bean-not-instantiated
Thank you for your time
that even on Stackoverflow I don't get any
usefull help.
I also tried to test other beans in the same project and they work
correctly...
You can find an extensive explanation here:
http://stackoverflow.com/questions/21017979/bean-not-instantiated
Thank you for your time
/questions/21017979/bean-not-instantiated
Thank you for your time
Il 12/01/2014 12:47, Jean-Louis MONTEIRO ha scritto:
Hi,
Any way you could share the project on github or even a zip file?
I guess you checked there is a beans.xml?
Jean Louis
Le 12 janv. 2014 12:01, Caterpillar caterpilla...@gmail.com a écrit :
Is it okay to share it on Wuala?
I'm not at home right now. Give it a try with an empty web-inf/beans.xml
It's just a marker to enable cdi.
If u have am error starting tomee, copy/paste it.
Jean Louis
Le 12 janv. 2014 16:11, Caterpillar caterpilla...@gmail.com a écrit :
Il 12/01/2014 12:47, Jean-Louis MONTEIRO ha scritto:
Il 12/01/2014 16:16, Jean-Louis MONTEIRO ha scritto:
I'm not at home right now. Give it a try with an empty web-inf/beans.xml
It's just a marker to enable cdi.
If u have am error starting tomee, copy/paste it.
Jean Louis
TomEE console: http://pastebin.com/x9Xh92Ab
Thank you
Ok so the good news is that your bean is found and being managed by cdi.
But your are trying to inject a logger which isn't managed by cdi.
Try adding a producer, common way to do.
Le 12 janv. 2014 16:24, Caterpillar caterpilla...@gmail.com a écrit :
Il 12/01/2014 16:16, Jean-Louis MONTEIRO ha
Il 12/01/2014 16:32, Jean-Louis MONTEIRO ha scritto:
Ok so the good news is that your bean is found and being managed by cdi.
But your are trying to inject a logger which isn't managed by cdi.
Try adding a producer, common way to do.
Ok. Not having experience with producer, I opened a S.O.
There are plenty of producer example over the internet. Even in the spec
itself producing a logger is shown. There are usually also a couple of
samples with producing entity managers.
Yes let us know please.
Le 12 janv. 2014 17:16, Caterpillar caterpilla...@gmail.com a écrit :
Il 12/01/2014
Side note: producing a logger is a wrong idea (see codi list to learn
why) so maybe just get rid of it
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014/1/12 Jean-Louis
CODI is a set of CDI components, however it's more or less migrated
over to DeltaSpike.
I responded to your question on stack overflow. I generally agree
with Romain's comment, injecting a logger makes very little sense,
since you're just wrapping it (the LOC to make a logger producer far
+ Logger is generally not Serializable and CDI 1.0 makes it not
injectable in passivation capable scope (I resume it but that's the
idea)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github:
On Sun, Jan 12, 2014 at 11:44 AM, Romain Manni-Bucau
rmannibu...@gmail.comwrote:
Side note: producing a logger is a wrong idea (see codi list to learn
why) so maybe just get rid of it
+1
My SLF4J example below.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Named(myController)
@Howard: make it static otherwise you can get surprises :p
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014/1/13 Howard W. Smith, Jr. smithh032...@gmail.com:
On Sun, Jan
18 matches
Mail list logo