That's the way I would use @Rollback too.
The problem is that the I have no chance of state refreshing after the rollback.
Actually I have got a page which displays a list of customers and one customer in detail, so that I can create, update and delete customers on one page.
The update could lazily consist of a delete and an insert, and a rollback in case there are business rules that prevent an insert.
As I have also to refresh the list in the transaction I run into the problem, that the list is wrong in case of a rollback.
Regards,
Christian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984982#3984982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984982
Hi konstantin thanks alot for your reply, do you mean that i shoul have :
@Entity
@Table(name = "Daughter")
@IdClass(DaughterKey.class)
@PrimaryKeyJoinColumn(name = "Mother_id")
public class Daughter extends Mother{
private String daughter_id;
@Id
private DaughterKey myKey=new DaughterKey();
public Daughter(){
super();
myKey.setMotherId(super.getId());
myKey.setDaughterId(getDaugherId())),
}
//.. getter/setter for all fields
}
instead of :
@Entity
@Table(name = "Daughter")
@IdClass(DaughterKey.class)
@PrimaryKeyJoinColumn(name = "Mother_id")
public class Daughter extends Mother{
@Id
private String daughter_id;
public Daughter(){ super();}
//.. getter/setter for all fields
}
Is it your idea ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984978#3984978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984978
I have been digging through the docs and code in order to figure out the best way to implement a custom eviction policy. The requirement that I have is to evict an item based on a timestamp within the element itself.
I don't know if this is the best way to handle this or should I just right a backend process that loops over the data and does a remove. I like the idea of the custom eviction policy. But I can't seem to find a way to access the actual data fields during the eviction process.
Thanks,
Pete G.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984974#3984974
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984974
"ngeadah" wrote : Is that not a JSF 1.2 method? I certainly don't see that method in javax.faces.context.ExternalContext...
|
| http://myfaces.apache.org/api/apidocs/index.html
|
| Any other thoughts?
Sorry. Yes, I was looking at the 1.2 javadoc. So for JSF 1.1 you would need to use the HttpServletResponse directly. My answer to your original question still applies. But the code looks like this instead:
@In (value="#{facesContext.externalContext}")
| private ExternalContext extCtx;
| .....
| .....
| .....
| HttpServletResponse response = (HttpServletResponse)extCtx.getResponse();
| response.setChcaracterEncoding("myencoding");
The main problem with this code is that it will break in a portlet environment.
Stan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984971#3984971
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984971