[jboss-user] [jBPM] - Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

2013-02-20 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is 
actualOwner but not in potential owners

To view the discussion, visit: https://community.jboss.org/message/798545#798545

--
 Also, a similar case is produced I think (I musy verify it tomorrow) when 
 user belongs to a group and task.potentialOwner contains only the group, not 
 the user.


Confirmed, but after reading WS-HumanTask 1.0 spec ( 
http://incubator.apache.org/hise/WS-HumanTask_v1.pdf 
http://incubator.apache.org/hise/WS-HumanTask_v1.pdf), chapter 4.7.3 Delegating 
or Forwarding a Human Task :
 Forwarding is possible if the task has a set of individually assigned 
 potential owners, not if its potential owners are assigned using one or many 
 groups.

So, this scenario isn't possible per the spec ;(

I'm deviating the original subject, so I should open another thread about how 
to forward / reassign / delegate / whatever a task to a group.
--

Reply to this message by going to Community
[https://community.jboss.org/message/798545#798545]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - jBPM 5.4 : how to forward / reassign a task to a group ?

2013-02-20 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

jBPM 5.4 : how to forward / reassign a task to a group ?

To view the discussion, visit: https://community.jboss.org/message/798550#798550

--
As mentioned in  https://community.jboss.org/thread/221465 
https://community.jboss.org/thread/221465, I need to reassign a task to a group.

This isn't normally possible via taskService.forward as per the spec 
WS-Huma,Task 1.0 chapter 4.7.3 Delegating or Forwarding a Human Task :

Forwarding is possible if the task has a set of individually assigned potential 
owners, not if its potential owners are assigned using one or many groups.


Is there a good way to do it with jBPM ?

For the moment, here's my working code, but it's kind of ugly :


public void reassign(TaskSummary taskSummary, String username,
    String targetGroupname) {
 
  Task task = taskService.getTask(taskSummary.getId());
 
  // check if username is in potentialOwners
  boolean userInPotentialOwners = false;
  for (OrganizationalEntity entity : task.getPeopleAssignments()
  .getPotentialOwners()) {
    if (entity.getId().equals(username)) {
  userInPotentialOwners = true;
  break;
    }
  }
 
  if (!userInPotentialOwners) {
    org.jbpm.task.User actualOwner = task.getTaskData()
    .getActualOwner();
 
    // we claim the task just to set actualOwner to current user
    if (taskSummary.getStatus() == Status.Ready
     (actualOwner == null || !actualOwner.getId().equals(
    username))) {
  taskService.claim(task.getId(), username);
  actualOwner = task.getTaskData().getActualOwner();
    }
 
    // if actualOwner is current user, we add it to potentialOwnersn,
    // just to call forward - see
    // https://community.jboss.org/thread/221465?tstart=0
    task.getPeopleAssignments().getPotentialOwners().add(actualOwner);
  }
 
  taskService.forward(taskSummary.getId(), username, targetGroupname);
 
  // forward reassigns the task.
  // if the task was already assigned to other groups / users, those groups / 
users are not removed from potentialOwners
  // we must do it explicitly
  PeopleAssignments peopleAssignments = task.getPeopleAssignments();
  ListOrganizationalEntity clonedList = peopleAssignments
  .getPotentialOwners();
  for (OrganizationalEntity entity : clonedList) {
    if (!entity.getId().equals(targetGroupname)
     !entity.getId().equals(Administrator)) {
  peopleAssignments.getPotentialOwners().remove(entity);
    }
  }
}


Thanks !
--

Reply to this message by going to Community
[https://community.jboss.org/message/798550#798550]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - jBPM 5.4 : original exception is swallowed when using LocalTaskService inside an EJB CMT

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

jBPM 5.4 : original exception is swallowed when using LocalTaskService inside 
an EJB CMT

To view the discussion, visit: https://community.jboss.org/message/798310#798310

--
Hello,

I'm using LocalTaskService inside an EJB CMT.

Problem is, whenever TaskService generates an error, it tries to rollback the 
transaction calling ut.rollback() instead of ut.setRollbackOnly().

So, the original exception is swallowed and instead I get 

Caused by: java.lang.IllegalStateException: JBAS014160: Tx erroné pour cette 
chaîne : TransactionImple  ac, BasicAction: 
0:0affce14:-23020732:512359da:43 status: ActionStatus.ABORTED  attendu, 
mais avons null
  at 
org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:80) 
[jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) 
[jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:302) 
[jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:188)
 [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
 [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42)
 [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
 [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
 [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)
 [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
 [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
 [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) 
[jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:181)
 [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 
[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
 [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at 
org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)
 [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at com.natixis.odeon.process.SampleProcessService$$$view9.forward(Unknown 
Source) [classes:]
 



I think there's an error in org.jbpm.task.service.TaskServiceSession, lien 462, 
takeOverTransaction should be false when we're running inside an EJB CMT.

} catch (RuntimeException re) {
    
    // We may not be the tx owner -- but something has gone wrong.
    // ..which is why we make ourselves owner, and roll the tx back. 
    boolean takeOverTransaction = true;
    tpm.rollBackTransaction(takeOverTransaction);
 
 
    doOperationInTransaction(new TransactedOperation() {
    public void doOperation() {
    task.getTaskData().setStatus(Status.Error);
    }
    });
 
 
    throw re;
} 


I'll update this thread whenever I'll have more info.

Can someone confirm this is a bug in jBPM ?

Thanks
--

Reply to this message by going to Community
[https://community.jboss.org/message/798310

[jboss-user] [jBPM] - Re: jBPM 5.4 : LocalTaskService transaction handling with CMT transaction

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : LocalTaskService transaction handling with CMT transaction

To view the discussion, visit: https://community.jboss.org/message/798337#798337

--
I changed TaskServiceSession implementation with the one attached.

The change is localized in the catch(Runtime re) showed in the previous post.

I've change it like this :


} catch (RuntimeException re) {
    
  tpm.rollBackTransaction(transactionOwner);
 
 
  if (transactionOwner) {
  doOperationInTransaction(new TransactedOperation() {
  public void doOperation() {
  task.getTaskData().setStatus(Status.Error);
  }
  });
  }
 
 
  throw re;
} 
 


Explanation:
* tpm.rollBackTransaction(transactionOwner) : this calls 
ut.setRollbackOnly(true) in the context of CMT transaction.
* if (transactionOwner) : updating task SGBD table cannot be done in a CMT 
transaction when rollback has been requested (we would need to start a new 
transaction for this).
--

Reply to this message by going to Community
[https://community.jboss.org/message/798337#798337]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM 5.4 : LocalTaskService transaction handling with CMT transaction

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : LocalTaskService transaction handling with CMT transaction

To view the discussion, visit: https://community.jboss.org/message/798344#798344

--
Created  https://issues.jboss.org/browse/JBPM-3927 
https://issues.jboss.org/browse/JBPM-3927

Thanks
--

Reply to this message by going to Community
[https://community.jboss.org/message/798344#798344]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner 
but not in potential owners

To view the discussion, visit: https://community.jboss.org/message/798352#798352

--
Hello,

I have the following scenario :
 * user admin creates a task for group businessGroup and user admin.
 * user demo (belonging to businessGroup) starts working on the task 
(taskService.start).
* user demo forwards the task to another group.

I get :

Caused by: org.jbpm.task.service.PermissionDeniedException: User 
'[User:'demo']' does not have permissions to execution operation 'Forward' on 
task id 35
  at 
org.jbpm.task.service.TaskServiceSession.evalCommand(TaskServiceSession.java:281)
 [classes:]
  at 
org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:428)
 [classes:]
  at 
org.jbpm.task.service.local.LocalTaskService.forward(LocalTaskService.java:141) 
[jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.6.0_24]
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
[rt.jar:1.6.0_24]
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [rt.jar:1.6.0_24]
  at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_24]
  at 
org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:44)
 [weld-core-1.1.9.Final.jar:2012-08-06 19:12]
  at 
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
 [weld-core-1.1.9.Final.jar:2012-08-06 19:12]
  at 
org.jboss.weld.proxies.TaskService$161873013$Proxy$_$$_WeldClientProxy.forward(TaskService$161873013$Proxy$_$$_WeldClientProxy.java)
 [weld-core-1.1.9.Final.jar:]
  at 
com.natixis.odeon.process.SampleProcessService.forward(SampleProcessService.java:103)
 [classes:]
 


From what I understood, Operation.Forward controls if 
userIsExplicitPotentialOwner. If it's not the case, jBPM considers that the 
user doesn't have the permissions to forward the task - even if the user is 
the owner of the task.

Is it a bug ? (I'm considering as normal that the actualOwner can forward the 
task on which he is working).

If yes, what should be done ?
 * add the owner of the task in potentialOwner list ?
 * on Operation.Forward check if the user is in the portentialOwner list or if 
he is the actualOwner.

Thanks !

P.S. sorry for the flood today ;(
--

Reply to this message by going to Community
[https://community.jboss.org/message/798352#798352]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is 
actualOwner but not in potential owners

To view the discussion, visit: https://community.jboss.org/message/798355#798355

--
For now, I'm adding actualOwner to potentialOwner as a temporary solution just 
before calling forward.


// add actualOwner to potentialOwners
Task task = taskService.getTask(taskId);
org.jbpm.task.User actualOwner = task.getTaskData().getActualOwner();
if (actualOwner != null) {
  PeopleAssignments peopleAssignments = task.getPeopleAssignments();
  if (! peopleAssignments.getPotentialOwners().contains(actualOwner)) {
    peopleAssignments.getPotentialOwners().add(actualOwner);
  }
}
 
taskService.forward(taskSummary.getId(), username, targetGroupname);
--

Reply to this message by going to Community
[https://community.jboss.org/message/798355#798355]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is 
actualOwner but not in potential owners

To view the discussion, visit: https://community.jboss.org/message/798356#798356

--
Created  https://issues.jboss.org/browse/JBPM-3927 
https://issues.jboss.org/browse/JBPM-3927

Thanks,
--

Reply to this message by going to Community
[https://community.jboss.org/message/798356#798356]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM 5.x : User and Group sharing same table

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.x : User and Group sharing same table

To view the discussion, visit: https://community.jboss.org/message/798376#798376

--
Fine for me, thanks roxy !
--

Reply to this message by going to Community
[https://community.jboss.org/message/798376#798376]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is 
actualOwner but not in potential owners

To view the discussion, visit: https://community.jboss.org/message/798410#798410

--
Also, a similar case is produced I think (I musy verify it tomorrow) when user 
belongs to a group and task.potentialOwner contains only the group, not the 
user.

Perhaps, changing userIsExplicitPotentialOwner is needed to also check if user 
belongs to one of the groups contained in task.potentialOwner.

I'll do some more tests tomorrow for this and update my temporary solution.
--

Reply to this message by going to Community
[https://community.jboss.org/message/798410#798410]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - Re: jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated

2013-02-19 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: jBPM TaskService.getTasksAssignedAsPotentialOwner  pagination method 
deprecated

To view the discussion, visit: https://community.jboss.org/message/798411#798411

--
Thanks roxy !

My question was more about where did database-side pagination go (in the 
previous versions of jBPM this was possible using the 2 parameters *int* 
firstResult, *int* maxResult).

I have the impression that now, if we have a huge inbox (or tasks assigned for 
the current user) we need to retrieve all the tasks from the database.

For now, I don't have any problem with that (just evaluating jBPM), but I want 
to know the best way to handle database pagination for these tasks when the 
need arise (I could call the deprecated method or the deprecated query method - 
but they are deprecated, so perhaps not the best solution ;( ).
--

Reply to this message by going to Community
[https://community.jboss.org/message/798411#798411]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - jBPM 5.x : User and Group sharing same table

2013-02-18 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

jBPM 5.x : User and Group sharing same table

To view the discussion, visit: https://community.jboss.org/message/798153#798153

--
Hello,

Just beginning with jBPM.

I believe User and Group share the same table : ORGANIZATIONALENTITY(DTYPE,ID).
And ORGANIZATIONALENTITY PK defines a single constraint on ID.
This makes it impossible to use the same name (i.e. admin) for a user and a 
group.

Am I missing something or is it a bug (or perhaps I need to customize 
something) ?

Thanks
--

Reply to this message by going to Community
[https://community.jboss.org/message/798153#798153]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [jBPM] - jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated

2013-02-18 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

jBPM TaskService.getTasksAssignedAsPotentialOwner  pagination method 
deprecated

To view the discussion, visit: https://community.jboss.org/message/798183#798183

--
Hello,

It seems with jBPM 5.4 that the following method is deprecated (as of  
https://issues.jboss.org/browse/JBPM-3695 
https://issues.jboss.org/browse/JBPM-3695)


@Deprecated
ListTaskSummary getTasksAssignedAsPotentialOwner(String userId, ListString 
groupIds, String language, int firstResult, int maxResult);


Is there another way now to have a list of tasks with pagination (I could use 
query but it's also Deprecated)  ?

Thanks
--

Reply to this message by going to Community
[https://community.jboss.org/message/798183#798183]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2034]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[jboss-user] [IronJacamar] - ironjacamar maven validator 1.1.0.Alpha7 throws

2012-06-12 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

ironjacamar maven validator 1.1.0.Alpha7 throws

To view the discussion, visit: https://community.jboss.org/message/741219#741219

--
Hello,

I'm trying to validate my jca connector with Ironjacamar maven validator (as 
documented here :  
http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/validator.html#validator_maven
 
http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/validator.html#validator_maven)

I get the following error when running mvn clean install on my pom.xml :

java.lang.IllegalStateException: Unable to find an annotation scanner implementa
tion
    at org.jboss.jca.common.spi.annotations.repository.AnnotationScannerFact
ory.getAnnotationScanner(AnnotationScannerFactory.java:72)
    at org.jboss.jca.validator.Validation.validate(Validation.java:148)
    at org.jboss.jca.validator.maven.ValidatorMojo.execute(ValidatorMojo.jav
a:72)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)


My pom.xml contains 
plugin
  groupIdorg.jboss.ironjacamar/groupId
  artifactIdironjacamar-validator-maven/artifactId
  version1.1.0.Alpha7/version
  executions
    execution
  goals
    goalvalidate/goal
  /goals
    /execution
  /executions
  configuration
    outputDir./outputDir
    rarFile${project.build.directory}/${project.build.finalName}.rar/rarFile
  /configuration
/plugin


If i add a dependency to ironjacamar-common-impl-papaki, everything runs fine :
plugin
  groupIdorg.jboss.ironjacamar/groupId
  artifactIdironjacamar-validator-maven/artifactId
  version1.1.0.Alpha7/version
  dependencies
    dependency
  groupIdorg.jboss.ironjacamar/groupId
  artifactIdironjacamar-common-impl-papaki/artifactId
  version1.1.0.Alpha7/version
    /dependency
  /dependencies
  executions
    execution
  goals
    goalvalidate/goal
  /goals
    /execution
  /executions
  configuration
    outputDir./outputDir
    rarFile${project.build.directory}/${project.build.finalName}.rar/rarFile
  /configuration
/plugin



Should I open an issue ?

Thanks
--

Reply to this message by going to Community
[https://community.jboss.org/message/741219#741219]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2098]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [IronJacamar] - Re: ironjacamar maven validator 1.1.0.Alpha7 throws

2012-06-12 Thread gonzalad
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

Re: ironjacamar maven validator 1.1.0.Alpha7 throws

To view the discussion, visit: https://community.jboss.org/message/741230#741230

--
Done :  https://issues.jboss.org/browse/JBJCA-832 
https://issues.jboss.org/browse/JBJCA-832

Thanks !
--

Reply to this message by going to Community
[https://community.jboss.org/message/741230#741230]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1containerType=14container=2098]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - birt : isnull attribute utility in p:param tag

2009-09-23 Thread gonzalad
Hello,

I don't understand very well the utility of isnull attribute in the JSF BIRT 
p:param tag.

For instance, I have the following code :

  | b:birt designType=embed designName=test.rptdesign embeddable=true 
masterpage=false
  | b:param name=clientId value=#{client.id} isnull=#{client.id == 
null}/
  | /b:birt
  | 

Why use a isnull attribute ? If client.id is null, I should theorically use :
b:birt designType=embed designName=test.rptdesign embeddable=true 
masterpage=false
  | b:param name=clientId value=#{client.id}/
  | /b:birt

From BIRT documentation 
http://www.eclipse.org/birt/phoenix/deploy/viewerUsage.php#command_options, I 
see :
anonymous wrote : 
  | The __isnull Option Report parameters can take a value, or can be null. 
(Here null means the database definition: the value is unknown.) By 
definition, date and numeric report parameters have a null value if the report 
parameter is provided in the URL, and the value is blank. However, string 
report parameters have an ambiguity: is an empty value to be considered blank 
(a string whose value is ), or null? Since blank is used more often, BIRT 
interprets an empty report parameter value as blank. To say a string parameter 
is is null, just write:
  | 
  | __isnull=yourParam 
  | 
  | While this option is primarily for string report parameters, it works just 
as well for other report parameter types as well. See the Report Parameters 
section below for additional details. 
  | 

But I doesn't help me to really understand why we have isnull attribute in the 
JSF tag.

If anyone has some insights about it, thanks !

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256566#4256566

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256566
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - birt tag : enhancement toolbar in embed mode

2009-09-23 Thread gonzalad
Hello,

About 
http://docs.jboss.org/tools/3.1.0.M2/en/jboss_birt_plugin_ref_guide/html/birt_integration_with_seam.html.

We would like to have the toolbar in embed mode and not only in frameset.

Do you think it's possible to add this feature in p:document ?

We're using the following code but it doesn't work :
p:birt xmlns:ui=http://java.sun.com/jsf/facelets;
  | xmlns:s=http://jboss.com/products/seam/taglib;
  | xmlns:p=http://jboss.com/products/seam/birt;
  | designType=embed
  | designName=test1.rptdesign
  | title=JBoss Birt Test
  | toolbar=true
  | navigationbar=true 
  | /p:birt
  | 


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256569#4256569

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256569
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - birt - Seam component always null with birt embed

2009-09-22 Thread gonzalad
Hello,

I'm using a Seam component in birt report (from a scripted datasource).
When I try to access a Seam Component from a birt report and when I use embed 
mode(designType=embed), Seam component is always null.
When I use designType=run, everything works fine.

I don't understand why.
It appears to me to have a relation with UIDocument's logic when we call 
JBossBirtServlet with an URLConnection :
URL birtURL = new URL(urlString);
  | URLConnection connection = birtURL.openConnection();
  | InputStream stream = connection.getInputStream();
  | 
When I change this code from UIDocument code to use requestDispatcher.include, 
it works fine.

Should I open a JIRA issue (with test case) ?

Thanks for your help !

My jsf page output :
The following items have errors:
  | 
  | ReportDesign (id = 1):
  | + There are errors evaluating script 
importPackage(Packages.org.jboss.seam);
  | importPackage(Packages.org.apache.log4j);
  | sampleReportList = Component.getInstance(sampleReportList, false);
  | logger = Logger.getLogger(com.natixis.birt);
  | logger.warn(sampleReportList = +sampleReportList);
  | reportsIterator = sampleReportList.getNames().iterator();
  | :
  | {1}.
  | 
  | Error.ScriptEvaluationError ( 1 time(s) )detail : 
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating 
script 
importPackage(Packages.org.jboss.seam);importPackage(Packages.org.apache.log4j);
  | sampleReportList = Component.getInstance(sampleReportList, false);
  | logger = Logger.getLogger(com.natixis.birt);
  | logger.warn(sampleReportList = +sampleReportList);
  | reportsIterator = sampleReportList.getNames().iterator();:{1}.
  | at 
org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:77)
 
  | ...
  | Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT 
exception occurred: There are errors evaluating script __bm_OPEN():TypeError: 
Cannot call method getNames of null (inline#7). See next exception for more 
information.There are errors evaluating script __bm_OPEN():TypeError: Cannot 
call method getNames of null (inline#7)   at 
org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
  | TypeError: Cannot call method getNames of null (inline#7)   at 
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3557) 
  | ...
  | + There are errors evaluating script if( !( reportsIterator.hasNext()) ){
  |  return( false );
  | }
  | var report = reportsIterator.next();
  | row[Name] = report;
  | return ( true );:
  | {1}.
  | 
  | Error.ScriptEvaluationError ( 1 time(s) )detail : 
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating 
script if( !( reportsIterator.hasNext()) ){  return( false );}var report = 
reportsIterator.next();row[Name] = report;return ( true );:{1}.at ...
  | 
org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(Dtorg.eclipse.birt.data.engine.core.DataException:
 A BIRT exception occurred: There are errors evaluating script 
__bm_FETCH():ReferenceError: reportsIterator n'est pas 
défini (inline#2). See next exception for more 
information.There are errors evaluating script __bm_FETCH():ReferenceError: 
reportsIterator n'est pas defini (inline#2) at 
org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118) at 
  | ...
  | + data.engine.BadFetchScriptReturnType
  | 

My sysout :
17:10:52,979 WARN  [birt] sampleReportList = null
  | 17:10:53,042 ERROR [STDERR] 22 sept. 2009 17:10:53 
org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor handleJS
  | ATTENTION: A BIRT exception occurred: There are errors evaluating script 
__bm_OPEN():
  | TypeError: Cannot call method getNames of null (inline#7). See next 
exception for more information.
  | There are errors evaluating script __bm_OPEN():
  | TypeError: Cannot call method getNames of null (inline#7)
  | org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: 
There are errors evaluating script __bm_OPEN():
  | TypeError: Cannot call method getNames of null (inline#7). See next 
exception for more information.
  | There are errors evaluating script __bm_OPEN():
  | TypeError: Cannot call method getNames of null (inline#7)
  | at 
org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
  | at 
org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:717)
  | at 
org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:76)
  | 

And the open method from my scripted datasource  :

  | importPackage(Packages.org.jboss.seam);
  | importPackage(Packages.org.apache.log4j);
  | sampleReportList = Component.getInstance(sampleReportList, false);
  | logger = Logger.getLogger(com.natixis.birt);
  | logger.warn(sampleReportList = +sampleReportList);
  | reportsIterator = sampleReportList.getNames().iterator();
  

[jboss-user] [JBoss Tools Users] - Re: birt - Seam component always null with birt embed

2009-09-22 Thread gonzalad
Thanks for your fast answer !

This issue appears only when using BIRT tag in embed mode. It works fine when 
using the same report in frameset or run mode.

So from my point of view this is a bug in the BIRT integration and not in Seam.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256464#4256464

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256464
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt - Seam component always null with birt embed

2009-09-22 Thread gonzalad
In fact, the problem in my opinion is in class 
org.jboss.seam.birt.ui.UIDocument.

This class is provided by JBoss Tools and corresponds to JSF tags p:birt which 
allows a JSF application to call BIRT (thanks once more to JBoss devs  much for 
those tags ! The only existing JSF tags for BIRT).

This class is contained in jboss-seam-birt.jar which is generated when you use 
JBoss tools to create a Seam Web Project birt BIRT runtime facet.

More documentation about those tags is available here : 
http://docs.jboss.org/tools/3.0.0.GA/en/jboss_birt_plugin_ref_guide/html/birtSeamWebProject.html#creating_web_project.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256468#4256468

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256468
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt - Seam component always null with birt embed

2009-09-22 Thread gonzalad
Thanks snjeza,

https://jira.jboss.org/jira/browse/JBIDE-4937 created.
I'll post the test case tomorrow (a bit late here ;) ).

Also found the explanation for this issue : the session isn't propagated in 
embed mode (UIDocument class creates a new URLConnection to call 
JBossBirtServlet without propagating session cookie JSESSIONID). 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256501#4256501

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256501
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt integration - reportContext.getHttpServletRequest i

2009-09-21 Thread gonzalad
Didn't have time today to investigate (sorry !).

I've created the JIRA issue https://jira.jboss.org/jira/browse/JBIDE-4929



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4256255#4256255

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4256255
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt integration - reportContext.getHttpServletRequest i

2009-09-17 Thread gonzalad
Thanks snjeza !

I didn't had any time to work on this one today, and the fix I suggested breaks 
on first request (reportContext.getHttpServletRequest() is null on the first 
call to the servlet).

I don't understand...

I'll work more on this next week and I'll create JIRA when I have a better fix 
to submit.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4255798#4255798

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4255798
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - birt integration - reportContext.getHttpServletRequest in em

2009-09-16 Thread gonzalad
Hello, 

I think there's a bug in JBossBirtServlet  :

Accessing reportContext.getHttpServletRequest() from scripted datasource 
returns null in embed mode.

I'm using a scripted datasource.
I've implemented in my report the open method as follow : 
logger.info(reportContext = +reportContext);
  | logger.info(reportContext.getHttpServletRequest = 
+reportContext.getHttpServletRequest());


reportContext.getHttpServletRequest() returns null when I use embed mode 
(designType=embed) 

It runs fine with frameset report.


I've just added the following line in JBossBirtServlet and it runs fine now :

options.setOption(InputOptions.OPT_REQUEST, req);

Should I raise a JIRA ?

Thanks !


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4255595#4255595

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4255595
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt integration - reportContext.getHttpServletRequest i

2009-09-16 Thread gonzalad
Sorry, 

The bug wasn't resolved by the line above.
It was resolved adding the following line in JBossBirtServlet :
appContext.put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, req);



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4255600#4255600

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4255600
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - Re: birt integration - tag p:birt broken on postback

2009-09-03 Thread gonzalad
Done : https://jira.jboss.org/jira/browse/JBIDE-4842

Thank you !

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4253245#4253245

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4253245
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Tools Users] - birt integration - tag p:birt broken on postback

2009-09-02 Thread gonzalad
Hello, 

I've used today p:birt tag with embed - just like in the sample :
b:birt designType=embed designName=ProductCatalog.rptdesign 
  | embeddable=true masterpage=false/

I have in the same JSF page a form with h:commandButton.
On first render, everything works fine.
On postback, birt tag generates an error (I dont remember exactly which one).
The line in error was in UIDocument#encodeBegin because designNameValue was 
null on postback :
buffer.append(URLEncoder.encode(designNameValue,UTF-8));



This is due because saveState and restoreState are not implemented in 
org.jboss.seam.birt.ui.UIDocument (just look at 
http://fisheye.jboss.org/browse/~raw,r=11184/JBossTools/trunk/birt/plugins/org.jboss.tools.birt.core/resources/jboss-seam-birt.jar
 for instance).

You should save the state of all the attributes in saveState method otherwise 
they are going to be null on every postback.

A second bug : some attributes are missing in saveState and restoreState of 
UIParameter (locale, isnull).

Should I fill a JIRA issue ?

Thanks !

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4253158#4253158

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4253158
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-11 Thread gonzalad
Hi lowecg2004,

Thanks for the tip.

Just modified the jpa-no-a4j.ear application adding :
anonymous wrote : core:init debug=false / 

But same results than before (looking at Seam code, debug=false is the 
default value).
So, for a constant throughput of 60tx/s, I have the following results :
cpu used=40%
elapsed(ms)=94ms
for a 5 minute long load-test.

Thanks you once more anyway !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111947#4111947

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111947
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-10 Thread gonzalad
So Monday

Hello !

Here is some more information about the load tests we executed.

If you want more information please tell me. Also, if you have an idea on how 
we can achieve betters results, I'm interested (of course !).
Otherwise I think you can find some interesting comparative and instructive (ar 
least for me !) performance results.
Please note, I'm really far from being a bench expert or a system expert - I'm 
only a humble little developper so once more please - if anyone sees some
interesting optimization to apply just tell me !

Also, those tests were made on a simple application and are not representative 
for application in production environment
(we didnt' have time to code one for each framework :)).

Extract
From our test: 
. Seam consumes 3 times (really average) more cpu than the same app with plain 
jsf.
. JSF consumes 3 times (really average) more than plain old Struts like app.

I would have really expected at the beginning a performance ratio of 2 times 
more for Seam app that Struts like but it's like 10 !
arrrggh !
 
I - Test Environment

1. Injector platform used :
Pentium IV 3 GHz, 2 Go RAM.
Windows XP Professional SP1 with JMeter 2.3.

2. App Server
Websphere 6.1.0.13
IBM JRE 5.0 SR6 64bits 
(Java(TM) 2 Runtime Environment, Standard Edition (build 
pap64devifx-20071025 (SR6b)).
sxqwas02 : 6 Processors 2.1 GHz Power PC5
40894464 Ko
One JVM
No clustering and no session replication.
JVM Parameters
Initial Heap Size = 256 Mo
Max Heap Size = 512 Mo
Web Container Threads = 
Session Timeout = 4 minutes
JDBC Pool = {connectionTimeout=60s, maxConnections=10, minConnections=5, 
reapTime=60, unusedTimeout=120, aged=0}
Threadpool : minSize = 5,maxSize = 20

3. Web Server
IBM HTTP Server 6.1.0.5
CPU : 1 proc 2812.972 MHz 
Dual-Core AMD Opteron(tm) Processor 8220 SE
RAM : 1025372 Ko
IHS Parameters
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers 5
MaxClients 150
MinSpareThreads 5
MaxSpareThreads 10
ThreadsPerChild 25
MaxRequestsPerChild 1


II - Test scenario

1. Scenario
User uses jpa sample application bundled with Seam.
All vusers execute the following scenario in loop :
1. go to page /jpa/home.seam
2. loggin
user=demo
pass=demo
3. user press the 'Find Hotel' button 
(no search criteria and max results=10).
4. user selects first record in the list
5. user books this hotel
6. user enters booking information
7. user confirms his reservation
8. user cancels his reservation.

2. mesurement points
All version of the application were tested with 15tx/s, 30tx/s, 60tx/s, 
120tx/s, 240tx/s.

3. Ramp up period/think time, vuser count, etc...
No think time.
No Ramp up period (we used a constant throughput timer in JMeter to limit the 
number of request to 15, 30, ...tx/s) depending on the scenario.

4. Applications tested
a. jpa sample modified to remove a4j and RichFaces components  libraries.
uses SUN RI 1.2 (bundled with Seam), facelets, Seam 2.0.0.GA
name:jpa-no-a4j.ear
same as jpa from Seam except rich*.jar removed, el-impl.jar added (if 
it wasn't already there).
b. jpa sample modified to remove Seam, include Spring for business Layer.
uses SUN RI 1.2, facelets, Spring (bundled with Seam 2.0.0.GA)
name:jpa-standard-jsf-facelets.ear
c. jpa sample modified to remove Seam and facelets, include Spring for business 
Layer.
uses SUN RI 1.2, JSP, Spring (bundled with Seam 2.0.0.GA)
name:jpa-standard-jsf-sun-1.2.ear
d. jpa sample modified to remove Seam and facelets, include Spring for business 
Layer.
uses IBM JSF (1.1), JSP, Spring (bundled with Seam 2.0.0.GA)
name:jpa-standard-jsf.ear
e. another demo application which runs with a Struts like framework.
name:demo.ear

5. Notes
Please, note that when we removed Seam, we put hotel list in request scope, not 
in session scope.
Note also log level was at WARN (so no logs after startup during test 
execution).


III Results

Result data was retrieved from :
a. JMeter Summary Report (tx/s, page size).
b. topas (cpu usage).
c. Wily Introscope (hea size, session size)

1. Test with 15tx/s
Scenario tx/s   CPU used(%) el time moy (ms)page 
size (ko)  session size (ko)   bytes used in heap (Mo)
  | jpa-no-a4j.ear 15  10   87  
 5,8  181,4 
 244,3
  | jpa-standard-jsf-facelets.ear   
  |   15   449  
 6,2  81,1   NA
  | jpa-standard-jsf.ear
  |   15   4 47 
 6,2  2,0220
  | jpa-standard-jsf-sun-1.2.ear
  |   15  4,5

[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-10 Thread gonzalad
Thank you very much for your concern Jay, I'm looking forward for any news you 
might have on this subject - whatever it would be (configuration change, code 
change or just different results than me).

I'll also be very interested about your performance results between plain jsf 
and seam if you make such tests.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111849#4111849

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111849
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam performance vs plain JSF

2007-12-06 Thread gonzalad
Hello,

We've just finished some performance test on the jpa sample application from 
seam 2.0.0.GA, and Seam consumes a lot of CPU.

Has anyone had a chance to optimize Seam ?
Is the dev team working on this subject ? 
(I'm really sorry - you're doing a really good work as you know, but those 
bench results are really scary ! ;(

Some results
Seam consumes from 2.2 (for 15 tx/s) to 4.3 (for 60tx/s) times more CPU than 
same application without Seam.

Seam powered application saturated at 86 tx/s (cpu saturation).
JSF application at 205tx/s (cpu saturation).

Applications tested
I've made various changes to the jpa sample application and tested each change :
1 - jpa sample.
2 - jpa sample without richfaces  a4j.
3 - spring sample (like jpa sample but with spring).
4 - spring sample with jsp instead of facelets.
5 - spring sample with jsp instead of facelets and JSF IBM 1.1 impl.

- Test Platform -
All test where executed with Websphere 6.1.0.13 and IBM JVM 5.0 SR 6 64 bits.
OS : AIX
Server : 6 CPU (2.1 GHz each) Power PC 5.
Don't remember RAM size.

I'll be able to give some more results on Monday - week end time now !

Bye

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111003#4111003

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111003
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-06 Thread gonzalad
Never in fact.

Why ?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111026#4111026

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111026
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-06 Thread gonzalad
svadu wrote : I wouldn't be surprised if you don't get very high performance 
using microcontainer because you're not using full JEE capabilities of 
application server.
I really don't see how MC would explain performance gain between plain jsf and 
seam. But I've never used MC. Could you explain MC benefits for my use case ?

svadu wrote : Was the JSF (without Seam) application a 'full' equivalent of a 
Seam application?
Yes, I've just removed Seam from the spring sample which is included in Seam 
2.0.0 GA distribution.

svadu wrote : I don't have hard numbers but in my case I had performance 
improved (didn't need to measure to see improvement) a lot mostly due to moving 
lot's of stuff from request (session scope was not acceptable) scope (JSF 
application) to conversation scope which reduced amount of database trips a lot.
I fully agree that it would increase my performance if I was using session 
replication in db. But since I'm not using session replication and I don't have 
session size problems, i don't see the benefits.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111033#4111033

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111033
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-06 Thread gonzalad
I'll send more info on Monday then.
Have a good week end and thanks for your help !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111038#4111038

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111038
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam performance vs plain JSF

2007-12-06 Thread gonzalad
svadu wrote : There is also somewhat older article from JBoss about Seam 
performance, might be interesting as reference information: 
http://www.dell.com/downloads/global/power/jbossworld_2006_june_jaffe.pdf

Thanks for this review, I've already looked at it, but read it once more (in 
case of..).

But doesn't help ;((
page 24 short think time : in fact all vusers involved in all tests had no 
think time.
logging : no log in any my tests (only at startup).
client vs server state : server state always used (session size was 180 ko ouch 
! for all tests).
no ejb : so no call by value problem
vusers where between 5 and 15.
no load balancing
no session replication
and no .css or .js or image requested from my vusers !


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4111032#4111032

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111032
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Critical bug with WebSphere

2007-12-05 Thread gonzalad
Hello,

Just made a quick google search.

This problem should be corrected with JVM JVM SR6. Didn't tested it.

For 64 bit : it is resolved with 5.0 Service Release 6 (pap64devifx-20071025) 
see also 
http://www.ibm.com/developerworks/java/jdk/aix/j564/fixes.html

The defect you report is 
build : asdev-20070720 
defect : 119922 
APAR : IY98467 


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4110452#4110452

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4110452
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam-gen : list.xhtml - Create Button issue

2007-11-30 Thread gonzalad
Created a separated issue from 1493  : 
http://jira.jboss.org/jira/browse/JBSEAM-2330

Thank you atao and pete !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4109444#4109444

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109444
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - seam-gen : list.xhtml - Create Button issue

2007-11-29 Thread gonzalad
Hello,

When using seam-gen (2.0.0) I have the following issue : in list page, button 
'Create entity' can disappear.

To reproduce the problem, you'll need 2 associated entities (i.e. @ManyToOne) :
1 - navigate to entity A list.
2 - click 'Create entity A' button.
3 - click 'Select entity B' button.
4 - on entity B edit page, just click on the menu link 'Entity A List'
5 - you're back to 'Entity A List' page, but the 'Create entity A' button just 
disappeared.

This issue is because Create button is rendered only if 'from' parameter is 
empty :
s:div styleClass=actionButtons rendered=#{empty from}

This isn't the case in interaction 4-5.

I've just modified menu.xhtml to force from parameter to '' and it resolves 
this issue :
changed from 
s:link view=/CustomerList.xhtml 
  |value=Customer List 
  |  propagation=none/
to :
s:link view=/CustomerList.xhtml 
  |value=Customer List 
  |  propagation=none
  | f:param name=from value=/
  | /s:link

Should I raise a JIRA ? Or have I misunderstood sthing ?

Thank you



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4108794#4108794

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108794
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: generating forms programatically

2007-11-29 Thread gonzalad
Hi, you can also look at http://code.google.com/p/krank/.

I've never used it, and never tested it. Perhaps it can help you...
RichardHightower is involved in this project.

Downsides : it doesn't build on top of Seam.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4108944#4108944

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108944
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: JBoss EL performance vs Sun EL

2007-11-22 Thread gonzalad
Hello,

I've also some serious performance problems with Jsf/Seam.

Some of these problems is due to SeamELResolver|getValue.

My sample application can stand only 3 users (no think time).
The application consumes 50% of the cpu (AIX system - don't have now the 
processor caractéristics).
Average response time = 0,5s - 8tx/s - average page size 55ko (html) .

Profiled a page (it's search page with 2 criteria that renders a list) with 
Wily Introscope.
24.3% of request duration is due to 
org.jboss.seam.el.SeamELResolver|getValue
which calls Namespace.getComponentInstance in a loop.
each call to Namespace.getComponentInstance consumes between 2 ou 4 ms.
2% for my Action execution (which calls jpa).

I can send the full trace if you're interested (size=400Mo).


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107090#4107090

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107090

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - disinjection and components.xml

2007-11-07 Thread gonzalad
Hello,

Perhaps a stupid question but...

In http://docs.jboss.com/seam/2.0.0.GA/reference/en/html/concepts.html#d0e2960, 
I read about disinjection : 
anonymous wrote : Injected values (@In) are disinjected (i.e, set to null) 
immediately after method completion and outjection. 

components.xml let us inject values like :
component name=org.jboss.seam.security.identity precedence=11 
class=com.test.SampleIdentity
  |property 
name=authenticationManager#{authenticationManager}/property
  | /component

But the setAuthenticationManager is only called at objet construction time, and 
no disinjection is done.

Is it a missing feature or does it just work like that ?

Thanks for the information !


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102576#4102576

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: disinjection and components.xml

2007-11-07 Thread gonzalad
Thanks Norman

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102625#4102625

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102625
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Custom ObjectConverter for selectItems - howto El in convert

2007-10-31 Thread gonzalad
Hello,

I'm coding a generic object converter which will work for non jpa backends 
(i.e. jca, jdbc, ...) - similar to the one in 
http://www.jboss.com/index.html?module=bbop=viewtopict=122149postdays=0postorder=ascstart=10.
But stateless.

The converter is used for selectItems - Here is a sample jsf code to display a 
country selectBox (sx:convertObject) :
h:selectOneMenu id=country
  | value=#{client.adress.country} styleClass=selectBox
  | sx:convertObject var=value asStringEl=value.id/
  | s:selectItems value=#{countryManager.allCountries}
  | var=country label=#{country.libelle}
  | noSelectionLabel=Please Select... /
  | /h:selectOneMenu

How does it work ?
On render, it applies the el #{value.id} on every object of selectItems (so 
call country.getId for every country).
On submit, it applies once more this el on all selectItems objects until 
retrieving the selected string value.

Here's my questions :
1. I would lik to use a real EL in asStringEl attribute.
How can I achieve it in a converter ?
I've tried setting asStringEl=#{value.id}, but facelets interprets it 
*before* my converter - and I retrieve value  in my converter.
2. Does this approach appears fine or is there a better one (it's my first Jsf 
converter - so quite a newbie...).

Sorry for this long mail and thank you very much for you help.

Here's my converter code :

@Name(com.natixis.sphinx.jsf.component.objectConverter)
  | @org.jboss.seam.annotations.jsf.Converter
  | @Scope(ScopeType.STATELESS)
  | @Install(precedence=Install.FRAMEWORK)
  | public class ObjectConverter implements Converter, Serializable {
  | 
  | /** Champ serialVersionUID. */
  | private static final long serialVersionUID = -8229857238533003490L;
  | private String asStringEl;
  | private String var;
  | 
  | public Object getAsObject(FacesContext aFacesContext, UIComponent 
aComponent, String aValueAsString) {
  | if (aValueAsString == null) {
  | return null;
  | }
  | 
  | //1. récupération valeurs selectItems
  | SelectItemsIterator lIterator = new SelectItemsIterator(aComponent);
  | 
  | //2. recherche du SelectItem correspondant à aValueAsString
  | while (lIterator.hasNext()) {
  | Object lItem = lIterator.next().getValue();
  | String lAsString = convertToString (lItem, aFacesContext);
  | if (aValueAsString.equals (lAsString)) {
  | return lItem;
  | }
  | }
  | //TODO : should never happen or illegal data ou aucune valeur 
sélectionnée
  | return null;
  | }
  | 
  | @SuppressWarnings(unchecked)
  | private void restoreInRequest(Object aOld, FacesContext aFacesContext) {
  | Map lRequestMap = 
aFacesContext.getExternalContext().getRequestMap();
  | if (aOld == null) {
  | lRequestMap.remove(getVar());
  | } else {
  | lRequestMap.put(getVar(), aOld);
  | }
  | }
  | 
  | @SuppressWarnings(unchecked)
  | private Object storeInRequest(Object aItem, FacesContext aFacesContext) 
{
  | Map lRequestMap = 
aFacesContext.getExternalContext().getRequestMap();
  | return lRequestMap.put(getVar(), aItem);
  | }
  | 
  | public String getVar() {
  | //valeur attribut var
  | return var;
  | }
  | 
  | public void setVar (String aVar) {
  | var = aVar;
  | }
  | 
  | public String getAsStringEl() {
  | return #{+asStringEl+};
  | }
  | 
  | public void setAsStringEl(String aValue) {
  | asStringEl = aValue;
  | }
  | 
  | public String getAsString(FacesContext aFacesContext, UIComponent 
aComponent, Object aValue) {
  | if (aValue == null) {
  | return null;
  | }
  | return convertToString(aValue, aFacesContext);
  | }
  | 
  | private String convertToString (Object aObject, FacesContext 
aFacesContext) {
  | Object lOld = storeInRequest (aObject, aFacesContext);
  | try {
  | return Interpolator.instance().interpolate(getAsStringEl());
  | } finally {
  | restoreInRequest (lOld, aFacesContext);
  | }
  | }
  | }
  | 

Here's the taglib.xml file :


  | ?xml version=1.0?
  | !DOCTYPE facelet-taglib PUBLIC
  |-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN
  |facelet-taglib_1_0.dtd
  |
  | facelet-taglib
  | namespacehttp://test.com/sphinx-jsf/taglib/namespace
  | tag
  | tag-nameconvertObject/tag-name
  | converter
  | 
converter-idcom.natixis.sphinx.jsf.component.objectConverter/converter-id
  | /converter
  | /tag
  | /facelet-taglib
  | 

An utility file (from myfaces 1.1.5) :


  | package com.natixis.sphinx.jsf.component;
  | 
  | import java.util.*;
  | 
  | import 

[jboss-user] [JBoss Seam] - Re: Custom ObjectConverter for selectItems - howto El in con

2007-10-31 Thread gonzalad
anonymous wrote : 1. I would lik to use a real EL in asStringEl attribute.
  | How can I achieve it in a converter ?
It appears only UIComponents support value expression associated with them. 
See http://issues.apache.org/jira/browse/MYFACES-189 or chapter 5 page 5-1 of 
JSF 1.2 spec.
So, I'm stuck using a non EL expression and adding #{ + } in my converter 
code before evaluating the resulting EL - quite a hack !

anonymous wrote : 2. Does this approach appears fine or is there a better one 
(it's my first Jsf converter - so quite a newbie...). 
I would really appreciate feedback on this one.
Is this converter approach fine or just awfully bad (and why ? performance 
problems ?).

Thanks once more !




View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4100886#4100886

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4100886
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Client side validation

2007-09-06 Thread gonzalad
Sorry sorry, forgot to raise JIRA issue.

Here it is : http://jira.jboss.org/jira/browse/JBSEAM-1906

N.B : it's priority is Major status, don't think this is allright.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081631#4081631

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081631
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple validation contexts

2007-09-05 Thread gonzalad
Thanks Pete !

If I have time, I'll go for the contextual validation module then (approach 2).
Otherwise, I'll go for the other approach.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081512#4081512

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081512
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam 2.0 BETA

2007-09-04 Thread gonzalad
Hello,

I'd like to know what the status betwwen Seam 2.0 and Websphere. 
I've read on this thread you had some hard times with this appserver. 
Do you plan to support it ?

Thanks for the information



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081104#4081104

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081104
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Multiple validation contexts

2007-09-04 Thread gonzalad
Hello,

I have a strange application (requirement) which implies different validation 
rules depending on the execution context.

Here's the explanation :
- the application will be used by 4/5 different organizations. Those will 
manipulate the same entities (same database) but each one of those 
organizations have some business specificities [1].
- the UI will be different for each of these clients.

[1] For instance field1 of EntityA will be optional for organization 1, whereas 
it will be mandatory for organization 2 (and min length = 2...).

We're going for the following decomposition :
1 - there will be a common module containing all the common rules. This will be 
a jar module with entities/dao/services.
2 - we'll create a web module for each organization. 
Specific business rules will be coded in actions or in specific services 
located in each web module.

So here's my question :
- where can I put validation logic (using Hibernate validation tags) ?
For common rules, it will be on jpa entities in the common module.
But for specific rules ?

I see only 2 solutions :
1 - use plain Jsf validators for the specific validation rules on the jsf pages.
2 - use or create a contextual validation module (see 
http://forum.hibernate.org/viewtopic.php?t=974761, also seen this kind of 
validation in the roadmap of Spring modules), and just put the context in the 
thread local (using some sort of filter for instance).

Do you have some ideas on thos approaches ? Is there sthing better I didn't 
thought about ? (surely...)

Thanks in advance !


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081126#4081126

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081126
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Client side validation

2007-06-09 Thread gonzalad
Sorry, 

Do you think I should fill a JIRA request for this functionnality ?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4052823#4052823

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052823
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Integrating Seam Security with 3rd party

2007-06-07 Thread gonzalad
Hello,

I have a problem overloading org.jboss.seam.security.Identity class, I would 
need to overload the subject - and this needs some modification in Seam 
Identity class.

Could this change be planned for a future release ?

My purpose is to integrate Seam security with Acegi (or another security 
system). So far, no problem (we didn't have Jaas Login Module, but just 
inherited from Identity), prototype is functional.

The main problem now is that the subject field of class Identity is private and 
that the class access it directly and not via the public getter [1].

Could there be a change in Identity class in order to alway access subject from 
it's getter so I can overload the getter method ?

Thanks

i.e. - extract from version 1.2.0.PATCH1 :
protected void unAuthenticate()
  | {  
  |   for ( Group sg : subject.getPrincipals(Group.class) )  
  |   {
  |  if ( ROLES_GROUP.equals( sg.getName() ) )
  |  {
  | subject.getPrincipals().remove(sg);
  | break;
  |  }
  |   }
  | }

I woud like sthing like :
protected void unAuthenticate()
  | {  
  |   for ( Group sg : getSubject().getPrincipals(Group.class) )  
  |   {
  |  if ( ROLES_GROUP.equals( sg.getName() ) )
  |  {
  | getSubject().getPrincipals().remove(sg);
  | break;
  |  }
  |   }
  | }

My purpose is afterward to overload getSubject with sthing like :
  | public Subject getSubject() {
  | return SeamAcegiAdapter.getSubject();
  | }

[1] In detail : login via a Seam JSF page isn't the problem. I've made it with 
the current version of Seam. My overloaded Identity calls Acegi 
authenticationManager authenticate method. So far, so good.
My problem is now I want to log via SSO or X509 mechanism using acegi filter. 
In this case, Acegi authentication is called but not Seam authentication. 
One solution would be to make a callback from Acegi authentication to Seam, but 
it doesn't seem to be the good solution.
The other solution would be to use the Acegi subject from seam by REFERENCE - 
so my need to overload the subject getter in Seam Identity class.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4052001#4052001

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052001
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Integrating Seam Security with 3rd party

2007-06-07 Thread gonzalad
Thanks, JIRA request created :

http://jira.jboss.org/jira/browse/JBSEAM-1414


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4052018#4052018

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052018
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Customizing error handling

2007-06-06 Thread gonzalad
Hello,

I would like to implement a generic error handling mecanism with Seam in order 
to catch and log exceptions generated from whatever the Jsf phase.

After having a look at Seam source code, I have found a - limited - solution 
for this, but before going on :
1. is there's a better way to do it.
2. if this is the way to go would it make some sens to create protected 
accessors (getters/setters) to exceptionHandlers attribute 
of Seam Exceptions class in order to be able to access this list from my child 
class ?
3. know how I can catch ALL jsf errors.

Since I want to build a generic error handling mecanism, I don't want to use 
pages.xml [1]

For question 1  2 here's a sample code (didn't try to run or compile it - just 
for the idea) :
In order to plugin my generic error handling, I'll create my own 
org.jboss.seam.core.exceptions component which will inherit from
org.jboss.seam.core.Exceptions.

@Scope(ScopeType.APPLICATION)
  | @Intercept(NEVER)
  | @Install(precedence=FRAMEWORK)
  | @Name(org.jboss.seam.core.exceptions)
  | public class Exceptions extends org.jboss.seam.core.Exceptions
  | {
  |
  |/**
  | * pNeed to redeclare this list since it's declared private on parent 
class./p
  | */
  |protected ListExceptionHandler myExceptionHandlers = new 
ArrayListExceptionHandler();
  |
  |public void handle(Exception e) throws Exception
  |{
  |   //build a list of the nested exceptions
  |   ListException causes = new ArrayListException();
  |   for (Exception cause=e; cause!=null; cause=EJB.getCause(cause))
  |   {
  |  causes.add(cause);
  |   }
  |   //try to match each handler in turn
  |   for (ExceptionHandler eh: exceptionHandlers)
  |   {
  |  //Try to handle most-nested exception before least-nested
  |  for (int i=causes.size()-1; i=0; i--)
  |  {
  | Exception cause = causes.get(i);
  | if ( eh.isHandler(cause) )
  | {
  |eh.handle(cause);
  |return;
  | }
  |  }
  |   }
  |
  |   //finally, call parent Exceptions handle
  |   super.handle (e);
  |}
  |
  |@Create
  |public void initialize() throws Exception 
  |{
  |   super.initialize();
  |   ExceptionHandler anyhandler1 = MyExceptionHandler(); 
  |   myExceptionHandlers.add( new AnnotationRedirectHandler() );
  |}
  | }

For question 3, I've made a few tests, Seam exception handling intercepts 
errors throw during INVOKE_APPLICATION_PHASE
and RENDER_VIEW_PHASE.
Errors during UPDATE_MODEL_VALUES phase are not handled (i.e. when throwing an 
nuchecked exception from a managed bean setter).
Don't know the handling for RESTORE_VIEW(1), APPLY_REQUEST_VALUES(2), 
PROCESS_VALIDATIONS(3).
Is there a way to handle all those errors ?

Thank you very much for your help

[1] : The main purpose of this error handling is to systematically log errors. 
I'll have a publish / subscribe mechanism used for other applications
(i.e. batch application), and want to reuse it for Seam applications)
I don't want to use pages.xml for that, since all applications I'm going to 
build will use this same
error logging mechanism. Application will use pages.xml to handle errors i.e. 
to navigate to an error page.



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4051724#4051724

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4051724
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Client side validation

2007-05-24 Thread gonzalad
Hello,

This question must already have been posted, but don't find the topic.

Is Seam going to support client side validation for some controls based on 
hibernate validator annotations (i.e. via javascript) ?

I know we can already do AJAX control (ajax4jsf), but for some apps I don't 
wan't to go all the way down to my app server.

Thank you very much for your help

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4048413#4048413

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048413
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Client side validation

2007-05-24 Thread gonzalad
Thank you very much for the quick reply !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4048427#4048427

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4048427
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam excell integration

2007-02-21 Thread gonzalad
Ok, thanks for the information Gavin !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4020070#4020070

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4020070
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Navigation patterns

2007-02-08 Thread gonzalad
Hi, 

I would like to begin a thread giving some samples of navigation patterns (like 
in chapter 1 of reference guide).

Since I'm a newbie (just 4 days looking at seam), my first sample can be a bit 
awkward.

If someone already started this kind of thread in this forum or elsewhere, 
please accept my apologies and just post me back a link towards it.
Also, if you think this post sucks, just tell me.

The first sample will be for a CRUD navigation and is mostly taken from the 
booking sample demo.

The CRUD consists of a list page and a detail page.

Here's the CRUD navigation specification :
1. list page allows pagination (next/previous).
2. list page allows deletion of multiple records.
3. list page allows selection criteria.
4. list page allows select detail page and navigate to detail page.
5. list page allows link to create record.
6. first acces to list page must be GET.
7. criteria must be kept somewhere in order to be maintained when navigating 
from detail to list page.
8. pagination next/previous or 'a la' Google.
9. selection criteria must be kept when navigating from detail - previous.
10. detail page allows creation / update / delete / cancel, and returns to list 
view.

- First solution : use Page scope - 

List and detail data is maintained on page scope.
This usage appears to be good whenever the detail data can be updated in one 
screen. Otherwise, you should use Conversation scope for detail data in order 
to update the detail data on multiple screens.

I tested this solution with debug.seam searching for a solution which minimizes 
server or client memory usage.

This sample uses :
. employeListAction as action java class for list.
. emlployeCriteriaList as java class to keep detail records.
. employeAction as action java class for detail.
. employeSearch.jspx for list page.
. employe.jspx for detail page.

Problems with this solution :

 session scope for keeping criteria data between detail and list navigation.
 using AJAX for client side validation which is quite overkill (I would prefer 
a pure - and good - javascript solution.


Here's the code :

pages.xml

page view-id=/employeSearch.jspx
  | navigation from-action=#{employeListAction.detail}
  | render view-id=/employe.jspx/
  | /navigation
  | navigation from-action=#{employeAction.newEmploye}
  | render view-id=/employe.jspx/
  | /navigation
  | /page
  | 
  | page view-id=/employe.jspx
  | !-- pattern redirect after post --
  | navigation from-action=#{employeAction.saveOrUpdate}
  | redirect view-id=/employeSearch.jspx/
  | /navigation
  | navigation from-action=#{employeAction.delete}
  | redirect view-id=/employeSearch.jspx/
  | /navigation
  | navigation from-action=#{employeAction.cancel}
  | render view-id=/employeSearch.jspx/
  | /navigation
  | /page
  | 

List action bean :


  | package org.pag.seam.example.employe;
  | 
  | import java.io.Serializable;
  | import java.util.ArrayList;
  | import java.util.HashMap;
  | import java.util.List;
  | import java.util.Map;
  | 
  | import org.hibernate.Session;
  | import org.jboss.seam.ScopeType;
  | import org.jboss.seam.annotations.Factory;
  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Logger;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Out;
  | import org.jboss.seam.annotations.Scope;
  | import org.jboss.seam.annotations.datamodel.DataModel;
  | import org.jboss.seam.annotations.datamodel.DataModelSelection;
  | import org.jboss.seam.core.FacesMessages;
  | import org.jboss.seam.log.Log;
  | 
  | 
  | @Name(employeListAction)
  | @Scope(ScopeType.PAGE)
  | public class EmployeListAction implements Serializable {
  | private static final long serialVersionUID = -7659479980987467214L;
  | 
  | /**
  |  * pThe @DataModelSelection annotation tells Seam to inject 
  |  * the xxx element that corresponded to the clicked link./p
  |  * 
  |  * pThe @Out annotation then exposes the selected 
  |  * value directly to the page. So ever time a row 
  |  * of the clickable list is selected, 
  |  * the xxx is injected to the attribute of the bean, 
  |  * and the subsequently outjected to the event context 
  |  * variable named message.   
  |  */
  | @DataModelSelection
  | @In(required=false)
  | @Out(required=false)
  | private Employe employe;
  | 
  | /**
  |  * The @DataModel annotation exposes an attibute 
  |  * of type java.util.List to the JSF page as an instance 
  |  * of javax.faces.model.DataModel. This allows us to use 
  |  * the list in a JSF h:dataTable with clickable links 
  |  * for each row. In this case, the DataModel  is made available 
  |  * in a session context 

[jboss-user] [JBoss Seam] - Re: Navigation patterns

2007-02-08 Thread gonzalad
Another downside of page scope.

For HTML page size :
list page = 81 ko.

There are 2 forms on this page (in to AJAX criteria entry and to render list 
data on key press).
First form (criteria data) is 24ko/
Second one (list data for 10 rows) is 48 ko.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4013149#4013149

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4013149
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: NotSerializableException on JSF rendering (scope Page)

2007-02-07 Thread gonzalad
Just got cvs content.

Works really fine for Scope Page !

Do you plan to release a 1.1.5 patch any sooner ?

N.B. : I've just realized data in page scope is initialized during 
UPDATE_MODEL_VALUES phase (and not RENDER PHASE - stupid of me !).
(c.f. AbstractSeamPhaseListener#beforeUpdateModelValues).
I'll make latter another post discussing navigation issues in a CRUD.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012316#4012316

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012316
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - NotSerializableException on JSF rendering (scope Page)

2007-02-06 Thread gonzalad
Hello,

I'm just beginning development with Seam.

I'm trying to build a CRUD application based on the booking sample.

I've a JSF page showing a list backed by an ActionList bean.

When I use  session scope for this bean, the page renders fine.

When I use page scope for this bean, seam exception page shows with the 
following stack Trace.

Has anyone experienced this error ?

java.io.NotSerializableException: java.lang.ThreadLocal
javax.faces.FacesException: java.io.NotSerializableException: 
java.lang.ThreadLocal
at 
org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:190)
at 
org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.java:150)
at 
org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(HtmlResponseStateManager.java:102)
at 
org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
at 
org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:91)
at 
org.jboss.seam.jsf.SeamStateManager.writeState(SeamStateManager.java:66)
at 
org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:91)
at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:599)
at 
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at 
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:222)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at 
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at 
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at 
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
at 
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
at 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:701)
at 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at 
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at 
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at 
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at 
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at 
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at 
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at 
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at 

[jboss-user] [JBoss Seam] - Re: NotSerializableException on JSF rendering (scope Page)

2007-02-06 Thread gonzalad
Thank you very much for your help Gavin.

I just delayed this mail cause I wanted to test the CVS content before.
Just using cvsgrab (like shiwed in seam wiki 
:http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamRepository).

Not finished. 

So I'll test tomorrow.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4012077#4012077

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4012077
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam customer references

2007-02-05 Thread gonzalad
Hello,

I need some customer references to show to my managers.

I'm evaluating some frameworks in order to suggest an evolution of our JEE and 
JSE programming model (we're currently using a Struts based framework).

I'm evaluating the Seam framework, and it seems very promising.

Could you communicate me some customer references using Seam (if public) ?
Are there some Seam apps running live, and for how much users/day ?
Are there banking companies using Seam or likewise some other big companies ?

Thank you very much for your help.

N.B. : I should perhaps contact http://www.jboss.com/services/consulting to 
have this kind of info. If this is the case, just tell me.

N.B. 2 : just looked at http://www.jboss.com/customers/index, but no seam 
reference.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4011347#4011347

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4011347
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam customer references

2007-02-05 Thread gonzalad
Thanks Norman, I'll definitely contact sales quarter then.

Have a nice day

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4011558#4011558

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4011558
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user