[Design of JBossCache] - Re: Thoughts on 2.0 API
by genman
"ben.wang(a)jboss.com" wrote :
| I don't quite agree that the current way of creating a default cache is that bad though. If you don't pass in the start flag then the default is to start the cache life cycle. Isn't this what you are asking for?
|
I guess I wasn't paying attention. :-/
"ben.wang(a)jboss.com" wrote :
| Sure this would be nice. Manik can say more definitely. But we do have a plan to elevate the Region into first class construct.
|
This would probably be my biggest suggestion. I'm not sure what the roadmap is, I did poke around JIRA and find these two issues:
http://jira.jboss.com/jira/browse/JBCACHE-64
http://jira.jboss.com/jira/browse/JBCACHE-86
Both of these suggest you'd want to extend Region in the future.
I also think that something like this:
Cache tokyo = Cache.getRegion("/tokyo").getCache();
would be really cool. Something like how List.subList is done. It'll allow you to segregate cache access better in your application.
A couple of other things:
| putIfNull -> putIfAbsent
|
The difference between the key doesn't exist and exists but points to null is a subtle one. The JavaDoc seems to imply "putIfAbsent"...
| * Puts a key and a value into the current node's data map if nothing exists
| under the key.
| * Does nothing if the key already exists.
|
you could simply "borrow" the javadoc from 1.5 ConcurrentMap:
| If the specified key is not already associated with a value, associate it with the given value. This is equivalent to
|
| if (!node.getKeys().contains(key))
| return node.put(key, value);
|
Actually, one thing I did notice is that "put" no longer returns the old value, was that intentional?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976123#3976123
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976123
19 years, 3 months
[Design of JBoss Collaboration Server] - Bug in installer with oracle enabled
by Rudi Vankeirsbilck
Guess this is a bug. It has happened 3 times no so it can't be a coincidence anymore.
Not sure if this is the right place to be posting it but here it is:
run the installer with java -jar install.jar, go through the screens and choose orace as database. Either generate a datasource or reuse an existing one, both end up with the same error.
The mail.ear/mail.sar/META-INF/jboss-service.xml will contain:
| <!-- Store using the JDBC3 Blob Store with the Oracle Database -->
| <!--
| <mbean code="org.jboss.mail.store.jdbc3.JDBC3Store"
| name="jboss.mail:type=MailServices,name=JDBC3Store,db=Oracle">
| <attribute name="PageSize">32384</attribute>
| <attribute name="Compress">false</attribute>
| <attribute name="CompressBufferSize">8192</attribute>
| <attribute name="ReadStatement">SELECT ID, DATA FROM BLOB_MAIL_STORE WHERE ID = ?</attribute>
| <attribute name="WriteStatement">SELECT ID, DATA FROM BLOB_MAIL_STORE WHERE ID = ? FOR UPDATE</attribute>
| <attribute name="IdColumn">ID</attribute>
| <attribute name="BlobColumn">DATA</attribute>
| <attribute name="UseStreams">false</attribute>
| <attribute name="Connected">false</attribute>
| <attribute name="StartIndex">1</attribute>
| </mbean>
|
Resulting in:
| 19:24:23,262 INFO [EARDeployer] Init J2EE application: file:/Applications/JBossMailServer/versions/1.0M5/server/default/deploy/mail.ear/
| 19:24:23,418 ERROR [STDERR] [Fatal Error] jboss-service.xml:174:8: The string "--" is not permitted within comments.
| 19:24:23,419 ERROR [MainDeployer] Could not initialise deployment: file:/Applications/JBossMailServer/versions/1.0M5/server/default/deploy/mail.ear/
| org.jboss.deployment.DeploymentException: The string "--" is not permitted within comments.; - nested throwable: (org.xml.sax.SAXParseException: The string "--" is not permitted within comments.)
| at org.jboss.deployment.SARDeployer.init(SARDeployer.java:217)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:861)
| at org.jboss.deployment.MainDeployer.init(MainDeployer.java:881)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
|
It suffices to remove the lines that says:
| <!--
|
from the block that defines the blob store for the oracle database.
Ending up with:
| <!-- Store using the JDBC3 Blob Store with the Oracle Database -->
| <mbean code="org.jboss.mail.store.jdbc3.JDBC3Store"
| name="jboss.mail:type=MailServices,name=JDBC3Store,db=Oracle">
| <attribute name="PageSize">32384</attribute>
| <attribute name="Compress">false</attribute>
| <attribute name="CompressBufferSize">8192</attribute>
| <attribute name="ReadStatement">SELECT ID, DATA FROM BLOB_MAIL_STORE WHERE ID = ?</attribute>
| <attribute name="WriteStatement">SELECT ID, DATA FROM BLOB_MAIL_STORE WHERE ID = ? FOR UPDATE</attribute>
| <attribute name="IdColumn">ID</attribute>
| <attribute name="BlobColumn">DATA</attribute>
| <attribute name="UseStreams">false</attribute>
| <attribute name="Connected">false</attribute>
| <attribute name="StartIndex">1</attribute>
| </mbean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976115#3976115
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976115
19 years, 3 months