[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975171#comment-13975171
 ] 

Romain Manni-Bucau commented on DELTASPIKE-580:
---

Just for memories we can investigate later the integration ith sirona which has 
dynamic interception and advanced monitoring. Event feature is interesting btw.

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek closed DELTASPIKE-580.
---

Resolution: Won't Fix
  Assignee: (was: Gerhard Petracek)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Reopened] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek reopened DELTASPIKE-580:
-


> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975125#comment-13975125
 ] 

Gerhard Petracek edited comment on DELTASPIKE-580 at 4/20/14 2:31 PM:
--

will be continued at https://github.com/os890/ds-monitoring-addon


was (Author: gpetracek):
will be continued at https://github.com/os890/ds-monitoring

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: (was: DELTASPIKE-580_first_draft.patch)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975136#comment-13975136
 ] 

Gerhard Petracek commented on DELTASPIKE-580:
-

@#1 only if you need a part of it (performance monitoring) for transactional 
beans
@#2 it's similar, but not the same

however, as you see i'm moving it to an add-on anyway.

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Mark Struberg (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975133#comment-13975133
 ] 

Mark Struberg commented on DELTASPIKE-580:
--

oh and I wrote the same 4 years ago. It also includes a dynamic registration of 
the interceptors:
https://github.com/struberg/InterDyn
It does not add much performance impact to the runtime and is useful enough. 

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Mark Struberg (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975131#comment-13975131
 ] 

Mark Struberg commented on DELTASPIKE-580:
--

doing almost the same in the transaction interceptor


{code}
@Alternative
@Dependent
public class MyProjectTransactionStrategy extends 
BeanManagedUserTransactionStrategy {
@Override
public Object execute(InvocationContext invocationContext) throws Exception 
{
long start = System.nanoTime();
try {
return  super.execute(invocationContext);
}
finally {
long duration = System.nanoTime() - start;
if (duration > threshold) {
logger.info("SLOW SERVICE DETECTED: time: {} ms {}#{} params = 
{}",
TimeUnit.NANOSECONDS.toMillis(duration),
invocationContext.getMethod().getDeclaringClass(),
invocationContext.getMethod().getName(),
ArrayUtils.toString(invocationContext.getParameters()));
}
}
}
...
{code}

works good enough for me

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek closed DELTASPIKE-580.
---

Resolution: Won't Fix

will be continued at https://github.com/os890/ds-monitoring

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Fix Version/s: (was: 0.7)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975101#comment-13975101
 ] 

Gerhard Petracek edited comment on DELTASPIKE-580 at 4/20/14 12:30 PM:
---

the first draft also includes an integration with jsf.

sample usage:

{code}
...
public void onMonitoredMethodInvocations(@Observes 
MonitoredMethodInvocationsEvent methodInvocationsEvent)
{
String userId = this.userHolder.getCurrentUserId();

for (MethodInvocationDescriptor methodInvocation : 
methodInvocationsEvent.getMethodInvocationDescriptors())
{
if (methodInvocation.getException() != null)
{
warn(userId + "@" + methodInvocation + ":L" + 
methodInvocation.getException().getStackTrace()[0].getLineNumber());
}
else
{
info(userId + "@" + methodInvocation);
}

if (methodInvocation.getExecutionTime() > this.maxThreshold)
{
warn("slow method-invocation detected: " + 
methodInvocation.getMethodDetails());
}
}
}
...
{code}


was (Author: gpetracek):
the first draft also includes an integration with jsf.

sample usage:

{code}
...
public void onMonitoredMethodInvocations(@Observes 
MonitoredMethodInvocationsEvent methodInvocationsEvent)
{
String userId = this.userHolder.getCurrentUserId();
String viewId = 
FacesContext.getCurrentInstance().getViewRoot().getViewId();

for (MethodInvocationDescriptor methodInvocation : 
methodInvocationsEvent.getMethodInvocationDescriptors())
{
if (methodInvocation.getException() != null)
{
warn(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails() + ":L" + 

methodInvocation.getException().getStackTrace()[0].getLineNumber() +
" failed with " + 
methodInvocation.getException().toString());
}
else
{
info(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails());
}

if (methodInvocation.getExecutionTime() > this.maxThreshold)
{
warn("slow method-invocation detected: " + 
methodInvocation.getMethodDetails());
}
}
}
...
{code}

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Issue Type: New Feature  (was: Bug)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: New Feature
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: (was: DELTASPIKE-580_first_draft.patch)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: DELTASPIKE-580_first_draft.patch

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-577) Test-control: Add delegation of container boot

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975110#comment-13975110
 ] 

Gerhard Petracek commented on DELTASPIKE-577:
-

@karl:
at that point the container is started already. use e.g. a static-block

> Test-control: Add delegation of container boot
> --
>
> Key: DELTASPIKE-577
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-577
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: CdiControl, TestControl
>Affects Versions: 0.7
>Reporter: Karl Kildén
>Priority: Minor
>
> container.boot(); is used by Test-Control.
>   
> This is nice for simple tests with cdictrl-openejb but I think it would be 
> nice to have the possibility to target the boot(Map properties) that is 
> available for the openejb container. I want Test-Control to delegate to me so 
> I can boot myself.
> I am thinking something like:
> @TestControl(bootDelegate = PropertyAwareEjbBootDelegate.class)
> public interface BootDelegate {
> public void boot(CdiContainer cdiContainer);
> }
> That way tests could be way more dynamic and end users could boot the 
> container in any way they want. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975109#comment-13975109
 ] 

Gerhard Petracek commented on DELTASPIKE-580:
-

i know, however, this is a very simple version which is enough for many cases 
and you have a special integration with jsf (needed for post-redirect-get).
once there are more complex requirements, sirona is a nice choice for sure.

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-577) Test-control: Add delegation of container boot

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975106#comment-13975106
 ] 

Romain Manni-Bucau commented on DELTASPIKE-577:
---

wherever it is, it should be before the container is started

> Test-control: Add delegation of container boot
> --
>
> Key: DELTASPIKE-577
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-577
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: CdiControl, TestControl
>Affects Versions: 0.7
>Reporter: Karl Kildén
>Priority: Minor
>
> container.boot(); is used by Test-Control.
>   
> This is nice for simple tests with cdictrl-openejb but I think it would be 
> nice to have the possibility to target the boot(Map properties) that is 
> available for the openejb container. I want Test-Control to delegate to me so 
> I can boot myself.
> I am thinking something like:
> @TestControl(bootDelegate = PropertyAwareEjbBootDelegate.class)
> public interface BootDelegate {
> public void boot(CdiContainer cdiContainer);
> }
> That way tests could be way more dynamic and end users could boot the 
> container in any way they want. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975105#comment-13975105
 ] 

Romain Manni-Bucau edited comment on DELTASPIKE-580 at 4/20/14 10:58 AM:
-

Sirona already has it


was (Author: romain.manni-bucau):
Sirona already have it

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975105#comment-13975105
 ] 

Romain Manni-Bucau commented on DELTASPIKE-580:
---

Sirona already have it

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975101#comment-13975101
 ] 

Gerhard Petracek commented on DELTASPIKE-580:
-

the first draft also includes an integration with jsf.

sample usage:

{code}
...
public void onMonitoredMethodInvocations(@Observes 
MonitoredMethodInvocationsEvent methodInvocationsEvent)
{
String userId = this.userHolder.getCurrentUserId();
String viewId = 
FacesContext.getCurrentInstance().getViewRoot().getViewId();

for (MethodInvocationDescriptor methodInvocation : 
methodInvocationsEvent.getMethodInvocationDescriptors())
{
if (methodInvocation.getException() != null)
{
warn(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails() + ":L" + 
methodInvocation.getException().getStackTrace()[0].getLineNumber() +
" failed with " + 
methodInvocation.getException().toString());
}
else
{
info(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails());
}

if (methodInvocation.getExecutionTime() > this.maxThreshold)
{
warn("slow method-invocation detected: " + 
methodInvocation.getMethodDetails());
}
}
}
...
{code}

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975101#comment-13975101
 ] 

Gerhard Petracek edited comment on DELTASPIKE-580 at 4/20/14 10:31 AM:
---

the first draft also includes an integration with jsf.

sample usage:

{code}
...
public void onMonitoredMethodInvocations(@Observes 
MonitoredMethodInvocationsEvent methodInvocationsEvent)
{
String userId = this.userHolder.getCurrentUserId();
String viewId = 
FacesContext.getCurrentInstance().getViewRoot().getViewId();

for (MethodInvocationDescriptor methodInvocation : 
methodInvocationsEvent.getMethodInvocationDescriptors())
{
if (methodInvocation.getException() != null)
{
warn(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails() + ":L" + 

methodInvocation.getException().getStackTrace()[0].getLineNumber() +
" failed with " + 
methodInvocation.getException().toString());
}
else
{
info(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails());
}

if (methodInvocation.getExecutionTime() > this.maxThreshold)
{
warn("slow method-invocation detected: " + 
methodInvocation.getMethodDetails());
}
}
}
...
{code}


was (Author: gpetracek):
the first draft also includes an integration with jsf.

sample usage:

{code}
...
public void onMonitoredMethodInvocations(@Observes 
MonitoredMethodInvocationsEvent methodInvocationsEvent)
{
String userId = this.userHolder.getCurrentUserId();
String viewId = 
FacesContext.getCurrentInstance().getViewRoot().getViewId();

for (MethodInvocationDescriptor methodInvocation : 
methodInvocationsEvent.getMethodInvocationDescriptors())
{
if (methodInvocation.getException() != null)
{
warn(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails() + ":L" + 
methodInvocation.getException().getStackTrace()[0].getLineNumber() +
" failed with " + 
methodInvocation.getException().toString());
}
else
{
info(userId + "@[" + viewId + "] at [" + new 
Date(methodInvocation.getTimestamp()) + "]: " +
methodInvocation.getMethodDetails());
}

if (methodInvocation.getExecutionTime() > this.maxThreshold)
{
warn("slow method-invocation detected: " + 
methodInvocation.getMethodDetails());
}
}
}
...
{code}

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: DELTASPIKE-580_first_draft.patch

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: (was: DELTASPIKE-580_first_draft.patch)

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-577) Test-control: Add delegation of container boot

2014-04-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975096#comment-13975096
 ] 

Karl Kildén commented on DELTASPIKE-577:


Ok got it thanks I would be more comfortable with test resources added to the 
test path and not on project level. Setting system properties would probably be 
sufficent for many needs I guess.

Do you mean like this:

@BeforeClass
public  static void  setup() {
System.setProperty("javax.persistence.jtaDataSource", "test-jta");
}

> Test-control: Add delegation of container boot
> --
>
> Key: DELTASPIKE-577
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-577
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: CdiControl, TestControl
>Affects Versions: 0.7
>Reporter: Karl Kildén
>Priority: Minor
>
> container.boot(); is used by Test-Control.
>   
> This is nice for simple tests with cdictrl-openejb but I think it would be 
> nice to have the possibility to target the boot(Map properties) that is 
> available for the openejb container. I want Test-Control to delegate to me so 
> I can boot myself.
> I am thinking something like:
> @TestControl(bootDelegate = PropertyAwareEjbBootDelegate.class)
> public interface BootDelegate {
> public void boot(CdiContainer cdiContainer);
> }
> That way tests could be way more dynamic and end users could boot the 
> container in any way they want. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Attachment: DELTASPIKE-580_first_draft.patch

> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
> Attachments: DELTASPIKE-580_first_draft.patch
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)

 [ 
https://issues.apache.org/jira/browse/DELTASPIKE-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek updated DELTASPIKE-580:


Description: 
use-cases to support:
 - exception monitoring
 - performance monitoring (via execution time)
 - auditing (with or without parameter values)

  was:
use-cases to support:
 - exception monitoring
 - auditing (with or without parameter values)


> @InvocationMonitored
> 
>
> Key: DELTASPIKE-580
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
> Project: DeltaSpike
>  Issue Type: Bug
>  Components: Core
>Reporter: Gerhard Petracek
>Assignee: Gerhard Petracek
> Fix For: 0.7
>
>
> use-cases to support:
>  - exception monitoring
>  - performance monitoring (via execution time)
>  - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (DELTASPIKE-580) @InvocationMonitored

2014-04-20 Thread Gerhard Petracek (JIRA)
Gerhard Petracek created DELTASPIKE-580:
---

 Summary: @InvocationMonitored
 Key: DELTASPIKE-580
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-580
 Project: DeltaSpike
  Issue Type: Bug
  Components: Core
Reporter: Gerhard Petracek
Assignee: Gerhard Petracek
 Fix For: 0.7


use-cases to support:
 - exception monitoring
 - auditing (with or without parameter values)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (DELTASPIKE-577) Test-control: Add delegation of container boot

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975073#comment-13975073
 ] 

Romain Manni-Bucau commented on DELTASPIKE-577:
---

${openejb.home}/conf. Depend surefire config but by default: 
${project.basedir}/conf

Note: when ignored you have in logs:

{code}
Cannot find the configuration file [conf/openejb.xml].  Will attempt to create 
one for the beans deployed.
{code}

and home is logged too:

{code}
INFO - openejb.home = /xxx/yyy
{code}

> Test-control: Add delegation of container boot
> --
>
> Key: DELTASPIKE-577
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-577
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: CdiControl, TestControl
>Affects Versions: 0.7
>Reporter: Karl Kildén
>Priority: Minor
>
> container.boot(); is used by Test-Control.
>   
> This is nice for simple tests with cdictrl-openejb but I think it would be 
> nice to have the possibility to target the boot(Map properties) that is 
> available for the openejb container. I want Test-Control to delegate to me so 
> I can boot myself.
> I am thinking something like:
> @TestControl(bootDelegate = PropertyAwareEjbBootDelegate.class)
> public interface BootDelegate {
> public void boot(CdiContainer cdiContainer);
> }
> That way tests could be way more dynamic and end users could boot the 
> container in any way they want. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (DELTASPIKE-577) Test-control: Add delegation of container boot

2014-04-20 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975073#comment-13975073
 ] 

Romain Manni-Bucau edited comment on DELTASPIKE-577 at 4/20/14 7:38 AM:


{code}
${openejb.home}/conf
{code}

Depend surefire config but by default:

{code}
${project.basedir}/conf
{code}

Note: when ignored you have in logs:

{code}
Cannot find the configuration file [conf/openejb.xml].  Will attempt to create 
one for the beans deployed.
{code}

and home is logged too:

{code}
INFO - openejb.home = /xxx/yyy
{code}


was (Author: romain.manni-bucau):
${openejb.home}/conf. Depend surefire config but by default: 
${project.basedir}/conf

Note: when ignored you have in logs:

{code}
Cannot find the configuration file [conf/openejb.xml].  Will attempt to create 
one for the beans deployed.
{code}

and home is logged too:

{code}
INFO - openejb.home = /xxx/yyy
{code}

> Test-control: Add delegation of container boot
> --
>
> Key: DELTASPIKE-577
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-577
> Project: DeltaSpike
>  Issue Type: Improvement
>  Components: CdiControl, TestControl
>Affects Versions: 0.7
>Reporter: Karl Kildén
>Priority: Minor
>
> container.boot(); is used by Test-Control.
>   
> This is nice for simple tests with cdictrl-openejb but I think it would be 
> nice to have the possibility to target the boot(Map properties) that is 
> available for the openejb container. I want Test-Control to delegate to me so 
> I can boot myself.
> I am thinking something like:
> @TestControl(bootDelegate = PropertyAwareEjbBootDelegate.class)
> public interface BootDelegate {
> public void boot(CdiContainer cdiContainer);
> }
> That way tests could be way more dynamic and end users could boot the 
> container in any way they want. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)