swd847 wrote :
| when a user logs in the user entity is outjected to session scope, allowing
it be used by other beans. When you think about it it makes sense that an
exception is thrown, how can you inject the current user if they have not
logged in yet?
|
|
Yes, I tought i had
Hi everyone,
I have a code like this:
|
| @Name(entity)
| public class Entity{
|
| ...
|
| }
|
and
|
| @Name(myPOJO)
| public class MyPOJO{
|
| @In
| private Entity entity;
|
| ...
| }
|
|
|
When I load the page that access this bean i get
matt.drees wrote : Which part of the hibernate example are you referring to?
This one:
| @Entity
| @Name(user)
| @Scope(SESSION)
| @Table(name=Users)
| public class User implements Serializable
| {
|private String username;
|private String password;
|private
saeediqbal1 wrote : exactly what was causing me alot of waste of time and
frustration. Something that works in the examples should also work in our
projects. whats up with that?
What a I don't undestand is that I can run the example perfetly, and I based my
projetc in this example.
Hope
swd847 wrote : Are you referring to the booking example?
|
| The reason why it works in the example is because of this little bit of
code in the AuthenticatorBean:
|
| @Out(required=false, scope = SESSION)
|private User user;
|
| when a user logs in the user entity is