Datasource aliases
by zagu@bigstring.com
Is it possible to have datasource aliases in JBoss? E.g. instead of:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-1</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-2</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
have something like:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-1</jndi-name>
<connection-url>jdbc:abc</connection-url>
<user-name>def</user-name>
<password>ghi</password>
...
</local-tx-datasource>
</datasources>
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>ds-2</jndi-name>
<alias>ds-1</alias>
</local-tx-datasource>
</datasources>
or something in that fashion. This would allow for:
- Not having duplicate information (e.g. connection URLs, usernames, passwords, etc.)
- Supporting legacy or just other applications that require the same logical connection, but use different data-source names
- Easy testing of multiple data-sources on one database (i.e. on the same data, even though the apps were designed to use physically different DBs)
Any ideas appreciated. Also - as a general thing - is it possible to have aliases for other things (e.g. MQ topic aliases, etc.).<img src="http://recallable.bigstring.com/Tx6tx7e1257786420.gif" alt="" width="0" height="0">
<img src="http://www.bigstring.com/refer.php?img=69" width="1" height="1">Start making money with PeopleString!
16 years, 5 months
[JBoss Cache Users] - Oracle exception occurring under load
by drcallaway
Our JBoss Cache configuration is currently using the JDBCCacheLoader and Oracle 11i. This seems to work fine but occasionally during load tests we'll get this error:
anonymous wrote : org.jboss.cache.CacheException: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
Our cache loader configuration looks like this (without connection pooling):
<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
| ignoreModifications="false" purgeOnStartup="false">
| <properties>
| cache.jdbc.table.name=jbosscache
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
| cache.jdbc.table.primarykey=jbosscache_pk
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=VARCHAR2(255)
| cache.jdbc.node.column=node
| cache.jdbc.parent.column=parent
| cache.jdbc.node.type=BLOB
| </properties>
| </loader>
The table created by JBoss Cache looks like this:
Name Null? Type
| ----------------------------------------- -------- ----------------------------
| FQN NOT NULL VARCHAR2(255)
| NODE BLOB
| PARENT VARCHAR2(255)
The length of the data stored in the FQN and PARENT fields has a maximum size of about 50 characters. Most of the objects stored in the cache are around 2k but some may exceed 4k. Does anyone know what causes this error and how to prevent it?
Thanks!
Dustin
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264640#4264640
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264640
16 years, 5 months
[JBoss Cache Users] - Unable to acquire lock on Fqn error
by drcallaway
During load tests, we keep running into this error:
anonymous wrote : org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/session/c06045ea-bb09-44c6-910d-d84eedc67d3e] after [10000] milliseconds
| for requestor [Thread[http-0.0.0.0-8080-199,5,jboss]]! Lock held by [null]
|
I've tried a number of different configuration changes with no success. Currently, my locking configuration looks like this:
<locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="10000"
| writeSkewCheck="false" useLockStriping="false" concurrencyLevel="1000"/>
I'm also using the JDBCCacheLoader with Oracle 11i. The load tests will run fine for quite a while but will eventually fail with the "Unable to acquire lock on Fqn" error. The session node specified by the FQN is only accessed by a single thread at a time. These session nodes are both read and written to but I've also seen this error on read-only nodes. Any ideas why this might occur? Why does it indicate that the lock is held by "[null]"?
Any help is appreciated.
Dustin
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264634#4264634
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264634
16 years, 5 months
[jBPM Users] - Programmatic task execution reopens the task
by matrixpooh
My sub-process definition consists of 3 sequential task nodes: start, task 1, task2, task3, end. At some point in the main process, I instantiate the sub-process. Later on, I retrieve the sub-process by id and trigger execution of the first task. The task successfully executes and
* falls down to initializeTaskVariables() of the task 2.
* commits task 1
* calls initializeTaskVariables() of task 1
* completes the token execution.
At the end of the run, the subprocess has 2 active tasks: a brand new task 1 and task 2. Repeating the call twice, I end up with all 3 tasks being successfully processed and 3 new tasks being created and pending in users' queue.
I observe the same problem running a much simpler case: a process definiton with 1 split, 2 tasks, 1 join. Seems that any programmatic execution of a task causes its execution followed by immediate instantiation of the same task.
I would appreciate if you could point out what I'm doing wrong
Here's the code snippet from main process instance:
| final ProcessInstance subProcessInstance = ctx.getJbpmContext()
| .getProcessInstanceForUpdate(subprocessInstanceId);
|
| .....
|
| ExecutionContext subprocessContext = new ExecutionContext(subProcessInstance.getRootToken());
| subProcessInstance.getRootToken().getNode().execute(subprocessContext);
|
This is debug output:
11:24:20,078 WARN |main|: [ProxyWarnLog:narrowProxy:615] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
11:24:20,093 DEBUG|main|: [CompleteAnalystTasksController:initializeTaskVariables:42] -------------current node::Perform Analyst task 1
11:24:20,093 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-end' on Task(Perform Analyst task 1) for Token(/)
11:24:20,093 DEBUG|main|: [CompleteAnalystTasksController:submitTaskVariables:52] -------------current node::Perform Analyst task 1
........
11:24:20,968 WARN |main|: [ProxyWarnLog:narrowProxy:615] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
11:24:20,984 DEBUG|main|: [CompleteAnalystTasksController:initializeTaskVariables:42] -------------current node::Perform Analyst task 2
11:24:20,984 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-create' on Task(Perform Analyst task 2) for Token(/)
11:24:21,000 DEBUG|main|: [TaskInstance:setActorId:258] assigning task 'Perform Analyst task 2' to 'analyst'
11:24:21,000 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-assign' on Task(Perform Analyst task 2) for Token(/)
11:24:21,000 DEBUG|main|: [GraphElement:fireEvent:179] event 'after-signal' on TaskNode(Perform Task 1) for Token(/)
11:24:21,000 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-create' on Task(Perform Analyst task 1) for Token(/)
11:24:21,015 DEBUG|main|: [TaskInstance:setActorId:258] assigning task 'Perform Analyst task 1' to 'analyst'
11:24:21,015 DEBUG|main|: [GraphElement:fireEvent:179] event 'task-assign' on Task(Perform Analyst task 1) for Token(/)
11:24:21,015 DEBUG|main|: [RecordCriterionChangeHandler:execute:66] ------------------Subprocess current Node After Call::TaskNode(Perform Task 2)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264628#4264628
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264628
16 years, 5 months