[JBoss Cache: Core Edition] - Re: Multiple Cache Loaders
by LORDs_diakonos
OK I have tried to extend the FileCacheLoader and use that to test what I am after. The issue is that I have break points on isCharacterPortableTree and isCharacterPortableLocation but I am not hitting either method and I don't understand why. I know my class is being loaded as I also put a break point in the constructor. But my get, puts or isCharacterPortableLocation methods are never called.
I was hoping to do this and test my case mentioned above to ignore a specific region in this cacheLoader. Basically I don't want one of the regions in disk cache but only memory cache.
My config is as follows
| <attribute name="IsolationLevel">READ_COMMITTED</attribute>
|
| <attribute name="CacheLoaderConfig">
| <config>
| <passivation>false</passivation>
| <cacheloader>
| <class>com.dotmarketing.business.TestLoader</class>
| <properties>
| location=/Users/jasontesser/dev/dotcms/trunk/cachetest
| check.character.portability=true
| </properties>
| <async>false</async>
| <fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
|
And my class
| public TestLoader() {
| super();
| }
|
| @Override
| public Map get(Fqn fqn) throws Exception {
| // TODO Auto-generated method stub
| return super.get(fqn);
| }
|
| @Override
| public void put(Fqn arg0, Map arg1, boolean arg2) throws Exception {
| // TODO Auto-generated method stub
| super.put(arg0, arg1, arg2);
| }
|
| @Override
| public Object put(Fqn arg0, Object arg1, Object arg2) throws Exception {
| // TODO Auto-generated method stub
| return super.put(arg0, arg1, arg2);
| }
|
| @Override
| public void put(Fqn fqn, Map attributes) throws Exception {
| // TODO Auto-generated method stub
| super.put(fqn, attributes);
| }
|
| @Override
| public void put(List<Modification> arg0) throws Exception {
| // TODO Auto-generated method stub
| super.put(arg0);
| }
|
| protected boolean isCharacterPortableLocation(String fileAbsolutePath) {
| if(fileAbsolutePath.indexOf("VelocityCache")>-1){
| return false;
| }
| return true;
| // return super.isCharacterPortableLocation(fileAbsolutePath);
| }
|
| protected boolean isCharacterPortableTree(Fqn fqn) {
| List elements = fqn.peekElements();
| // Don't assume the Fqn is composed of Strings!!
| for (Object anElement : elements){
| if(anElement.toString().contains("VelocityCache")){
| return false;
| }
| }
| return true;
| // return super.isCharacterPortableTree(fqn);
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241248#4241248
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241248
16 years, 9 months
[JCA/JBoss] - Configure no-tx-datasource: not to acquire shared lock
by vigneshmpn
I am using JBoss 4.2.3.
Our application queries multiple ODS datasources. As they are read-only operations, all the ODS datasources are configured as no-tx-datasource as we don't need the read operations to be part of any transaction. I understand that though the read operations are not part of a transaction, the SELECT query would still acquire a shared lock on the data records read until the result is returned. So we need a configuration so that the read operations (SELECT queries) on the datasources does not acquire shared lock on the data records read.
We don't want to add "WITH (NOLOCK)" in all our queries. Instead we would like to configure the transaction isolation level to TRANSACTION_READ_UNCOMMITTED for the datasources. But the JBoss documentation mentions that the property <transaction-isolation/> is not applicable for no-tx-datasource.
Is there a way to configure a no-tx-datasource, not to acquire a shared lock on execution of a SELECT query? I could be conceptually wrong about my understanding of no-tx-datasource.
One workaround we thought is to configure them as local-tx-datasource and mention the transaction-isolation property. But most part of our business logic run as part of container-managed transaction, and so we don't want the read operations to be part of the transaction unnecessarily.
I would highly appreciate any help.
Thanks
Vignesh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241244#4241244
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241244
16 years, 9 months
trouble with sample Todo program
by Tom Gendron
Hi,
I am running jbos-5.1.0GA on OSX. Seems to work fine but I can't find
the example program Todo documented in the getting started guide.
According to the document it is suppose to be in the docs/examples
directory but it is not there. I have down loaded what seems to be the
code but it does not work.
Anyone run in to this? Suggestions as to where I might find a working
example of Todo. Also if you could suggest some good tutorial material
that is know to work please send me the references. I see many via
google but a recommendation would be helpful
thanks
--
Tom Gendron
Systems Engineering
Sun Microsystems
781 442-2622
16 years, 9 months
[EJB/JBoss] - Business Interface Pattern + Generics == EJB Spec Violation
by kurron
I'm working on an EJB 2.1 project where we are required to provide both local and remote interfaces to the EJBs. The team likes to use the Business Interface Pattern and we use generics to get around issue where remote interfaces are required to throw RemoteException while local interfaces are not. This technique worked fine under WebSphere 6.1 but we get an EJB spec violation error under JBoss AS 5.1.0.GA during deployment:
anonymous wrote : "09:55:54,905 WARN [verifier] EJB spec violation:
| Bean : PersonEJB
| Method : public abstract void delete(Long) throws Exception, UnknownIdDeviation
| Section: 7.11.5
| Warning: The methods in the remote interface must include java.rmi.RemoteException in their throws clause."
Our code looks similar to this:
public interface AddressBeanBusinessInterface <E extends Exception>
| {
| public Long create( final Address address ) throws E;
| public Address read( final Long key ) throws E, UnknownIdDeviation;
| public void update( final Address address ) throws E, UnknownIdDeviation;
| public void delete( final Long key ) throws E, UnknownIdDeviation;
| }
|
| public interface AddressBeanLocal extends EJBLocalObject, AddressBeanBusinessInterface<RuntimeException>
| {
| // empty - see the business interface for the local EJB methods
| }
|
| public interface AddressBeanRemote extends EJBObject, AddressBeanBusinessInterface<RemoteException>
| {
| // empty - see the business interface for the remote EJB methods
| }
I'm not an expert on generics but I thought that by the time everything got compiled all the typing modifications are done so I wouldn't expect JBoss' reflection code to get confused. Anybody have any ideas on what we might try to resolve this issue?
Many Thanks,
Ron
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241234#4241234
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241234
16 years, 9 months
[JBoss jBPM] - JBPM BPEL 1.1.1 Getting variables of processInstance
by evilsephiroth
Hi, i've been playing with JBPM BPEL 1.1.1. and deployed some workflow.
My problem is that i can't get the name and the value of the variables that
the workflow consumes...
|
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("bpel.cfg.xml");
| JbpmContext context=jbpmConfiguration.createJbpmContext();
| ProcessInstance inst= cont.getProcessInstance(new Long(46)) //My process with 2 variables associated of type String
| Map varsMap=inst.getContextInstance().getVariables();
|
|
With the code above i can get the variables but these variables are MessageValue and i don't know a generic mode to get the String value of
the variables from this MessageValue. I've searched even in MessageValuePart but the data is in Binary..
I don't know if there's a converter or helper that can translate from messageValue saved for every process instance in variables...
Any help is appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241232#4241232
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241232
16 years, 9 months