[JBossCache] - 2.0 and JMX
by FredrikJ
I'm using 2.0 in a standalone application. When using 1.4 I got the JBoss Cache registered to JMX by default (I think). Now when we are testing out 2.0, it doesn't seem to get registered to JMX anymore.
However, registering the cache manually works perfectly fine:
| CacheImpl cache = createCache();
| MBeanServer mbs = getMBeanServer();
| mbs.registerMBean(cache.getCacheMBeanInterface(), monitorName);
|
Is this the new preferred way of registering a cache to JMX or are you planning a more automated way? Using the method above also means we have to reference CacheImpl (and not just Cache).
Also, while I'm at it, I realize that the MBean interface is work-in-progress since it is still missing out on a lot of information if you compare it to 1.4. However, I would vote for adding the getMembers() so we can easily inspect the members of a distributed cache via JConsole (or any other JMX tool).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035964#4035964
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035964
19 years
[JBoss Seam] - DataModelSelection not updated
by hispeedsurfer
Hi,
have a table and use row selection with DataModelSelection. If the whole table is loaded all is perfect. But when I use searchpattern like in booking example(ajax) to reduce tablesize DataModelSelection not updated. For example all times the first row from whole table is selected while this row no longer exist in reduced table.
| public abstract class AbstractListBean<T extends BaseEntity>implements Serializable {
|
| protected String searchString;
|
| @PersistenceContext
| protected EntityManager em;
|
|
| @DataModelSelection
| private T selectedEntity;
| }
|
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("specialreleaselist")
| @SuppressWarnings("unchecked")
| public class SpecialreleaseListBean extends AbstractListBean<SpecialRelease> implements
| SpecialreleaseList {
|
| /**
| *
| */
| private static final long serialVersionUID = 1L;
|
|
| @In
| FacesMessages facesMessages;
|
| @DataModel
| protected List<SpecialRelease> sprTablelist;
|
|
| @Factory("sprTablelist")
| public void find(){
| sprTablelist = loadList();
| }
| @Factory(value="specialreleasepattern", scope=ScopeType.EVENT)
| public String getSearchPattern(){
| return searchString==null ?
| "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
| }
|
|
| protected List<SpecialRelease> loadList() {
| List readFromDB = null;
| readFromDB = readFromDB("select s from SpecialRelease s where lower(s.description) like #{specialreleasepattern}");
|
| return readFromDB;
| }
| }
What is the right way updating DataModelSelection?
Thanks
Andi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035958#4035958
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035958
19 years
[JBoss Seam] - Domain design with EJB3 and Seam
by c_inconnu
Hi,
My question is about access level modifiers in the model design (with EJB3 entity and Seam). For example, I'd like to have something like that :
| @Entity
| public class MyUser
| extends XXX
| {
| private String login;
|
| protected MyUser()
| {
| // used by EJB3
| }
|
| public MyUser(String login)
| {
| this.setLogin(login);
| }
|
| public String getLogin()
| {
| return this.login;
| }
|
| protected void setLogin(String login)
| {
| this.login = login;
| }
| }
|
So that "login" cannot be modified (~final). EJB3 specs allow the protected constructor (i don't know about the setter), but anyway, Seam requires a public no-args constructor and a public setLogin. For me that's not a good design practice since the entity is then merely a C struct.
What are your opinion about that ? Am i doing something wrong ?
Thanks
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035954#4035954
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035954
19 years