[JBoss Cache POJO Edition] - How exactly PojoCache.detach(Fqn fqn) works ... ?
by Ajuba Ajuba
Ajuba Ajuba [http://community.jboss.org/people/ajuba] created the discussion
"How exactly PojoCache.detach(Fqn fqn) works ... ?"
To view the discussion, visit: http://community.jboss.org/message/543366#543366
--------------------------------------------------------------
I am using PojoCache version 3.0.x "Nana" with JobssAS 5.0.1
I am using JDBC CacheLoader "org.jboss.cache.loader.JDBCCacheLoader" for persisting the Nodes.
Configurations are as follows:
<!-- New 1.3.x cache loader config block -->
<attribute name="CacheLoaderConfiguration">
<config>
<passivation>false</passivation>
<cacheloader>
<class>org.jboss.cache.loader.JDBCCacheLoader</class>
<!-- whether the cache loader writes are asynchronous -->
<async>false</async>
<!-- only one cache loader in the chain may set fetchPersistentState to true.
An exception is thrown if more than one cache loader sets this to true.
-->
<fetchPersistentState>true</fetchPersistentState>
<!-- determines whether this cache loader ignores writes - defaults to false.
-->
<ignoreModifications>false</ignoreModifications>
<!-- if set to true, purges the contents of this cache loader when the cache
starts up. Defaults to false. -->
<purgeOnStartup>false</purgeOnStartup>
<!-- same as the old CacheLoaderConfig attribute -->
<properties>
cache.jdbc.driver=com.mysql.jdbc.Driver
cache.jdbc.url=jdbc:mysql://ipaddress/pojocachedb
cache.jdbc.user=myuser
cache.jdbc.password=mypassword
<!-- table properties -->
cache.jdbc.table.name=feedbackpojocache
cache.jdbc.table.create=false
cache.jdbc.table.drop=false
cache.jdbc.table.primarykey=feedbackpojocache_pk
cache.jdbc.fqn.column=fqn
cache.jdbc.fqn.type=varchar(255)
cache.jdbc.node.column=node
cache.jdbc.node.type=LONGBLOB
cache.jdbc.parent.column=parent
</properties>
</cacheloader>
</config>
</attribute>
Now when i am attaching fqn to PojoCache it is working fine, means it is writing it to Database as (FQN, NODE, PARENT) also.
but when i am detaching the Node it is deleting only NODE value from database ... not deleting the FQN and PARENT vlaues from database;
what to do..?
means how to delete FQN, NODE, PARENT from database.. when detaching the given Fqn..?
Pls help.
Regards,
Ajuba
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543366#543366]
Start a new discussion in JBoss Cache POJO Edition at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-user] [JNDI and Naming] - EJB 3.1 @Singleton remote access
by Christian Tre
Christian Tre [http://community.jboss.org/people/RET] replied to the discussion
"EJB 3.1 @Singleton remote access"
To view the discussion, visit: http://community.jboss.org/message/543352#543352
--------------------------------------------------------------
content of ear:
ejb3.jar
log4j.properties
META-INF/
META-INF/application.xml
META-INF/jboss-app.xml
content of jar:
de/
de/xxx/
de/xxx/business/
de/xxx/business/service/
de/xxx/business/service/BaseEntityService.class
de/xxx/business/service/BaseEntityServiceImpl.class
de/xxx/business/service/core/
de/xxx/business/service/core/CompanyServiceImpl.class
de/xxx/business/service/core/interceptor/
de/xxx/business/service/core/interceptor/FunInterceptor.class
de/xxx/business/service/core/interceptor/LogInterceptor.class
de/xxx/business/service/core/interceptor/ParameterReloader.class
de/xxx/business/service/core/interfaces/
de/xxx/business/service/core/interfaces/CompanyService.class
de/xxx/business/service/core/interfaces/CompanyServiceLocal.class
de/xxx/business/service/core/interfaces/ParameterHolder.class
de/xxx/business/service/core/interfaces/ParameterHolderLocal.class
de/xxx/business/service/core/interfaces/ParameterService.class
de/xxx/business/service/core/interfaces/ParameterServiceLocal.class
de/xxx/business/service/core/ParameterHolderImpl.class
de/xxx/business/service/core/ParameterServiceImpl.class
de/xxx/Globals.class
de/xxx/persistence/
de/xxx/persistence/entity/
de/xxx/persistence/entity/BaseEntity.class
de/xxx/persistence/entity/core/
de/xxx/persistence/entity/core/Company.class
de/xxx/persistence/entity/core/Parameter.class
de/xxx/persistence/entity/Entity.class
de/xxx/test/
de/xxx/test/CoreServicesRemoteTest.class
de/xxx/test/CRUDServiceTest.class
de/xxx/test/JndiTest.class
de/xxx/test/StarterService.class
de/xxx/test/StarterServiceMBean.class
de/xxx/utils/
de/xxx/utils/EqualsUtil.class
de/xxx/utils/HashCodeUtil.class
de/xxx/utils/jndi/
de/xxx/utils/JndiConnection$SERVERTYPE.class
de/xxx/utils/JndiConnection.class
de/xxx/utils/jndi/GlassFishJNDIContextFactory.class
de/xxx/utils/jndi/JBossJNDIContextFactory.class
de/xxx/utils/jndi/NetWeaverJNDIContextFactory.class
de/xxx/utils/jndi/WebLogicJNDIContextFactory.class
de/xxx/utils/PortalUtils.class
log4j.properties
META-INF/persistence.xml
META-INF/starter-service.xml
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543352#543352]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
[EJB 3.0] - nested Interceptor-calls
by Christian Tre
Christian Tre [http://community.jboss.org/people/RET] created the discussion
"nested Interceptor-calls"
To view the discussion, visit: http://community.jboss.org/message/543348#543348
--------------------------------------------------------------
Hello there,
i noticed, that nested methodcalls not raise an interception if the methods ar called from an @Interceptor-annotated method (tested for same Interceptor).
an example:
@Stateless
@Interceptors(LogInterceptor.class)
public class ParameterServiceImpl extends BaseEntityServiceImpl<Parameter> implements ParameterService, ParameterServiceLocal {
...
@Interceptors(ParameterReloader.class) // first i tried without this...
public void create(String name, String value, Company company, boolean visible, boolean readonly) {
Parameter p = new Parameter(name, value, company, visible, readonly);
this.create(p);
}
@Override
@Interceptors(ParameterReloader.class)
public void create(Parameter entity) {
super.create(entity);
}
...
}
the first method calls the create(Parameter)-method, but the 2nd methodcall does not raise Interception.
*At first i tried it without annotating the first method* and wondering that nothing happens (expected Action if the 2nd method get called).
So this is a bug or a feature to prevent infinite Interceptor-loops?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543348#543348]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
Re: [jboss-user] [jBPM] - How to get list of tasks for all users and processes
by Maurice de Chateau
Maurice de Chateau [http://community.jboss.org/people/MohReece] replied to the discussion
"How to get list of tasks for all users and processes"
To view the discussion, visit: http://community.jboss.org/message/543347#543347
--------------------------------------------------------------
Hi Kiran,
When you're looking for tasks (I'm guessing you're interested in TaskInstances instead of their definitions here) you have the possibility to use the jBPM API, but because in this API the tasks are mostly referred to through the process instance or the user they correspond to, that can be a bit cumbersome. You'd get something like the following:
JbpmContext jbpmCtx = JbpmConfiguration.getInstance().createJbpmContext();
try {
List<TaskInstance> allTasks = new ArrayList<TaskInstance>();
List<ProcessDefinition> pds = jbpmCtx.getGraphSession().findAllProcessDefinitions();
for (ProcessDefinition pd : pds) {
List<ProcessInstance> pis = jbpmCtx.getGraphSession().findProcessInstances(pd.getId());
for (ProcessInstance pi : pis) {
List<TaskInstance> tis = jbpmCtx.getTaskMgmtSession().findTaskInstancesByProcessInstance(pi);
allTasks.addAll(tis);
}
}
// allTasks now contains all available tasks...
} finally {
jbpmCtx.close();
}
It's probably easier to try to get the list of task instances more directly from the jBPM database, much like the reply above indicates. But if you're not keen on using SQL (or HQL) in you're queries, something like the following would do the trick as well:
List<TaskInstance> allTasks = jbpmCtx.getSession().createCriteria(TaskInstance.class).list();
Hope this helps...
Regards,
Maurice
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543347#543347]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months