[JBoss Seam] - Re: authenticator.authenticate called several times
by terryb
I tried org.jboss.seam.loggedOut and org.jboss.seam.security.loggedOut and also @Observer(Identity.EVENT_LOGGED_OUT) but no success.
Pete, I used debugger and found that Identity.logout() does attempt to raise event but there is no event to be raise. Event.raiseEvent() method shows List variable 'observers' being null.
Seems for some reason my @Observer(Identity.EVENT_LOGGED_OUT) is being ignored?
| Seam Events.java
| public void raiseEvent(String type, Object... parameters)
| {
| ...
| List<Init.ObserverMethod> observers = Init.instance().getObserverMethods(type);
| List<Init.ObserverMethod> observers = Init.instance().getObserverMethods(type);
| if (observers!=null)
| {
| ...
|
| }
| }
|
|
| My Authenticator.java
| @Observer(Identity.EVENT_LOGGED_OUT)
| public void logout() {
| activityLog.logOrgUser(orgUserAuthenticated.getUser(), ActivityLogger.Code.LOGOUT, null);
| }
|
|
| note that in my case RuleBasedIdentity.logout() is invoked first then Identity.logout().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122234#4122234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122234
18 years, 6 months
[JBossCache] - Config Question
by lovelyliatroim
Hi Folks,
I have a cache configured with a JDBCCacheLoader and in my cache i have a region where i dont want any nodes in the cache memory i.e they will be retrieved through the cacheloader. How do i configure the region to have no nodes in memory since if i set it to 0 then this means no limit?? Maybe -1??
Ok next question. Im running some tests where im writing 32kb image to the DB through JBossCache. This is the region where i would like it to have no nodes in memory but currently have it configured to 1. Now if i write say 5000 objects/blobs to the cache/db i get a good throughput figure around 95 per second, however if i run the same test for a sustained period of time this figure drops down to around 20 per sec. Thats a big drop. Now I have a feeling that 2 things might be causing or attributing to the drop. First being the asynch mode, havent looked to see how it works under the hood but i assume that the write requests are buffered somewhere in memory and the heavier the load the more write requests will be buffered, when i run 5,000 writes, its a short burst but when i run the test over a sustained period all these writes are adding on to the asynch buffer thus increasing the load in memory and slowing down throughput. 2nd thing that i think is causing a problem is the eviction of the 1 node i have in memory. When the test is running i get a flury of debug messages saying "node added" and then it pauses for 1-2 seconds and then i start seeing
anonymous wrote :
| Eviction of /image/3457 timed out, retrying later
|
And it generally comes in groups of 3´s and then carries on writing, pauses again, outputs the above and carries on again. Now if i could configure my region to tell the cache to have no nodes in memory then this would probably remove this problem or is there something else i can do??
Any thoughts on why the big drop over time??
Another question i was thinking about, is there any way to give the asynch buffer more time i.e to catch up or how exactly does the asynch mode work under the hood.
And my last question. ;) Its off topic a bit, do you know what JBoss AS 5.0 milestones are i.e when the final production release will be.(I see the road map but no dates http://jira.jboss.com/jira/browse/JBAS?report=com.atlassian.jira.plugin.s... ) In a bit of dilema as to whether to use JBoss Cache 1.4 with JBoss AS 4.2.x or go with JBoss Cache 2.0 and AS 5.0 Beta3 at the moment!! My production release date is May....any thoughts on it, pro´s or cons??
Any help or comments is much appreciated,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122231#4122231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122231
18 years, 6 months
[Security & JAAS/JBoss] - Re: NullPointerException @ DatabaseServerLoginModule.java:14
by jaikiran
That's strange. I would have expected a NamenotFoundException or NamingException if it was a problem with the lookup. Can you post the output of the JNDI tree, which can be accessed as follows:
- Go to http://< server>:< port>/jmx-console (Ex: http://localhost:8080/jmx-console)
- Search for service=JNDIView on the jmx-console page
- Click on that link
- On the page that comes up click on the Invoke button beside the list() method
- The page that comes up will show the contents of the JNDI tree.
Post the output here.
Also, try removing the DOCTYPE declaration from your ds.xml file as follows and see if it works:
<?xml version="1.0" encoding="UTF-8"?>
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>FluxMonClockerDS</jndi-name>
|
| <connection-url>
| jdbc:postgresql://localhost:5432/fluxmon
| </connection-url>
| <driver-class>org.postgresql.Driver</driver-class>
| <user-name>fluxmon</user-name>
| <password>fluxmon</password>
| <metadata>
| <type-mapping>PostgreSQL 8.0</type-mapping>
| </metadata>
|
| </local-tx-datasource>
| </datasources>
Which version of JBoss are you using?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122230#4122230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122230
18 years, 6 months
[JBoss jBPM] - problems creating task instances
by sgrassie
Hi,
I'm having a problem creating task instances, specifically for the 1st task node in the fairly simple workflow I've created. I can create the first task ok, and I can end it, and save the instance.
However upon creating the context again and reloading the process instance, things go badly - I can't create a task instance from there.
Here is a JUnit4 test case that illustrates what I am trying to do, and the processdefinition.xml is below. If anyone can point out what I'm doing wrong or point me in the right direction, I'd be most grateful.
| @Test
| public void nativeTaskInstanceCommits() {
| File f = TestFiles.getFile("SimpleWorkflow");
| JbpmContext context = JbpmConfiguration.getInstance().createJbpmContext();
|
| try {
| jbpmContext.setActorId("user");
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlReader(new FileReader(f));
| context.deployProcessDefinition(processDefinition);
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| context.save(processInstance);
|
| TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
| Long id = processInstance.getId();
| Assert.assertTrue("startTask".equals(taskInstance.getName()));
| taskInstance.end();
| context.save(taskInstance);
| context.close();
|
| context = JbpmConfiguration.getInstance().createJbpmContext();
|
| //this doesn't seem to work for me
| processInstance = context.loadProcessInstanceForUpdate(id);
| taskInstance = processInstance.getTaskMgmtInstance().createTaskInstance();
| Assert.assertTrue("firstTask".equals(taskInstance.getName()));
|
| List<?> list = taskInstance.getToken().getNode().getLeavingTransitions();
|
| for(Object o : list) {
| Transition trans = (Transition)o;
| String name = trans.getName();
| Assert.assertTrue( (name.equals("finish")) || (name.equals("to taskNode2")) );
| }
|
| taskInstance.end("finish");
| Assert.assertTrue("end".equals(taskInstance.getToken().getNode().getName()));
|
| } catch (RuntimeException e) {
| Assert.fail(e.getMessage());
| }
| catch (Exception e) {
| Assert.fail(e.getMessage());
| }
| }
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="SimpleWorkflow">
|
|
| <swimlane name="swimlane1">
| <assignment expression="user(test)"></assignment>
| </swimlane>
|
|
| <start-state name="start">
| <task name="startTask" swimlane="swimlane1">
| <description>
| The start node's Task
| </description>
| </task>
| <transition to="taskNode1" name="starting transition"></transition>
| </start-state>
|
|
| <task-node name="taskNode1">
| <task swimlane="swimlane1" name="firstTask">
| <description>
| The first task in the workflow
| </description>
| </task>
| <transition to="taskNode2" name="to taskNode2"></transition>
| <transition to="end" name="finish"></transition>
| </task-node>
|
| <task-node name="taskNode2">
| <task name="secondTask" swimlane="swimlane1">
| <description>
| The second task in the workflow
| </description>
| </task>
| <transition to="end" name="to end"></transition>
| </task-node>
|
|
| <end-state name="end"></end-state>
|
|
| </process-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122220#4122220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122220
18 years, 6 months