Java JVM分析,线程状态 - “监视”状态是什么意思?(Java JVM profiling, thread status - what does “Monitor” status mean?)
我使用visualVM连接多线程Java应用程序,线程有4个状态,即运行,睡眠,等待,监视。 监控状态是什么意思? 等待和监视器有什么区别?
I use visualVM connect a multi thread Java application, thread has 4 status, namely running, sleeping, wait, Monitor. What does this Monitoring status mean? What's the difference between wait and Monitor?
原文:https://stackoverflow.com/questions/6705400
最满意答案
要将事件接收器绑定到特定的内容类型,可以使用内容类型元素文件的XmlDocuments元素。 以下是我即将出版的书“建立SharePoint用户体验”的一个相当独特的摘录:
而且,为了澄清,因为我没有看到您尝试发布的XML,您可以将其添加到elements.xml文件中的内容类型声明中。
(......)
使用功能将事件接收器附加到内容类型
附加事件接收器的重要之处就像我们刚才看到的,注意到没有办法将接收器绑定到内容类型,只能绑定到列表模板。
不,没有办法将接收器添加到单个列表中。 但是,正如我们在列表森林中的电子邮件启用自定义列表部分中所看到的那样,我们可以使用代码以编程方式添加事件接收器。 我们可以使用相同的技术将事件接收器添加到内容类型中,但应该有一种方法可以在特征中使用CAML来完成此操作。 毕竟这是我们定义内容类型的地方,我们将在本章后面看到。
答案? 内容类型中的事件接收器在元素文件的不同部分中定义。 我们再次看看XmlDocuments和第三个内置的XmlDocument类型Receiver。 Receiver XmlDocument驻留在http://schemas.microsoft.com/sharepoint/events名称空间中。 如果要在默认SharePoint安装中查看Receiver XmlDocument,请在ctypeswss.xml文件中搜索内容类型为0x010107的DocumentWorkflowItem:
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events"> <spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events"> <Receiver> <Name>Workflow Library Item Added</Name> <Type>ItemAdded</Type> <SequenceNumber>1</SequenceNumber> <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,~CCC PublicKeyToken=71e9bce111e9429c</Assembly> <Class>Microsoft.SharePoint.Workflow.SPWorkflowLibraryEventReceiver</Class> <Data /> <Filter /> </Receiver> … (snipped for space saving purposes </Receivers> </XmlDocument>
注意该示例对Receivers元素使用前缀spe:。 从技术角度来看,这不是必需的,但可以增加您的代码的清晰度。 如您所见,Receiver元素遵循元素中定义的常规项目事件接收器的结构。 当然,除了接收者是在内容类型的XmlDocument部分定义的。
To bind an event receiver to a specific content type, you use the XmlDocuments element of the content type elements file. Here's a rather exclusive excerpt from my upcoming book "Building the SharePoint User Experience":
And, just to clarify, since I don't see the XML you tried to post, you would add this to the content type declaration in the elements.xml file.
(...)
Attaching event receivers to content types using features
The important thing with attaching event receivers like we just saw is to notice that there is no way to bind a receiver to a content type, only to a list template.
No, there are no ways to add receivers to individual lists either. However, as we saw in the Email enabling custom lists section in the Forest of lists chapter we can programmatically add event receivers using code. We can use the same technique to add event receivers to a content type as well, but there should be a way to do this using CAML in a feature. After all that is where we define the content type, as we will see later in the chapter.
The answer? Event receivers in content types are defined in a different section of the elements file. Again we look to XmlDocuments and the third built-in XmlDocument type Receiver. The Receiver XmlDocument resides in the http://schemas.microsoft.com/sharepoint/events namespace. If you want to see a Receiver XmlDocument in your default SharePoint installation, search the ctypeswss.xml file for the content type 0x010107, the DocumentWorkflowItem:
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events"> <spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events"> <Receiver> <Name>Workflow Library Item Added</Name> <Type>ItemAdded</Type> <SequenceNumber>1</SequenceNumber> <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,~CCC PublicKeyToken=71e9bce111e9429c</Assembly> <Class>Microsoft.SharePoint.Workflow.SPWorkflowLibraryEventReceiver</Class> <Data /> <Filter /> </Receiver> … (snipped for space saving purposes </Receivers> </XmlDocument>
Note The example uses a prefix spe: for the Receivers element. This is not necessary from a technical point of view, but can add clarity to your code. As you can see, the Receiver element follows the structure of a regular item event receiver as defined in elements. Except, of course, that the receiver is defined in the XmlDocument section of the content type.
相关问答
更多-
你如何将事件接收器绑定到*特定*自定义内容类型?(How do you bound an event receiver to a *specific* custom content type?)[2023-01-23]
要将事件接收器绑定到特定的内容类型,可以使用内容类型元素文件的XmlDocuments元素。 以下是我即将出版的书“建立SharePoint用户体验”的一个相当独特的摘录: 而且,为了澄清,因为我没有看到您尝试发布的XML,您可以将其添加到elements.xml文件中的内容类型声明中。 (......) 使用功能将事件接收器附加到内容类型 附加事件接收器的重要之处就像我们刚才看到的,注意到没有办法将接收器绑定到内容类型,只能绑定到列表模板。 不,没有办法将接收器添加到单个列表中。 但是,正如我们在列表森林 ... -
使用Google Cast - 媒体播放器库创建自定义接收器(Creating a custom receiver with the Google Cast - Media Player Library)[2022-10-16]
如果打开调试,则可以看到消息交换(请参见此处的“调试”部分)。 我们的github repo上还有一个完整的接收器示例项目。 If you turn on the debugging, you can see message exchanges (see here, under the Debugging section). There is a full fledged receiver sample project on our github repo as well. -
我成功地使用了这个。 我离开了我的日志记录和日志记录方法。 ///
/// This method is executed on feature activation. /// It attaches the event receiver to the content type. /// public override void FeatureActivated(SPFeatureReceiverProperties prop ... -
我自己从未这样做,但我相信你需要安装SharePoint在线工具。 然后,您需要执行一些powershell命令然后删除。 # Paths to SDK. Please verify location on your computer. Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" Add-Ty ...
-
您是否尝试过使用类似SPList.EventReceivers的方式,以事件接收器列表的形式下拉列表,并查看是否将正确的事件绑定到接收器上? 有时候,XML文件不能准确显示数据库的内容。 -Shaun Have you tried programmtically pulling down a list of Event Receivers using something like SPList.EventReceivers and seeing if the correct events are bound ...
-
来自PWBroadcastReceiver的远程意图过滤器,你不需要它。 我在AndroidManifest.xml中没有看到任何元标记 您需要将接收器名称添加到元数据标记到AndroidManifest.xml,否则SDK不知道将推送通知路由到哪里。当你说“自定义接收器”时,这意味着你已经编写了自己的接收器。 这样做时,你是否为图像添加了任何标签以及相关逻辑以将该元素用于图像? 听起来你没有。 Styled和Default接收器就是这样做的,这就是为什么在使用这些接收器时可以看到图像的原因。 When you say "custom receiver", it means that you have written your own receiver. When doing that, did you add any tag ...好的,最后我有一个自定义类型绑定的ComboBox。 如果我做错了,请告诉我。 MAPComboBox.cs using System.Collections.Generic; using System.Windows.Forms; namespace MAPClient { class MAPComboBox : ComboBox { private MAPCodeObjectCollection MAPCodeItemCollection = null; ne ...
SharePoint 2010中的事件接收器的自定义错误消息(Custom Error Message for Event Receiver in SharePoint 2010)[2022-03-10]
我使用了您在问题中提供的相同代码,我收到显示的自定义错误消息,如下图所示 - 请提供您收到的错误的详细信息。 I used the same code you have provided in your question, I get custom error message displayed as shown in below image - Please provide details of the error you are getting.不,你不能在MediaMetaData中使用自定义键。 您可以添加自己的命名空间来发送数据,也可以搭载一些api调用提供的自定义数据。 No you cannot use custom keys in MediaMetaData. You can add your own namespace to send the data or you can piggyback on custom data that some api calls provide.相关文章
更多- http status 汇总
- 解决Hadoop抛出的Task process exit with nonzero status of 134异常
- Hadoop运行时错误:Task process exit with nonzero status of 1
- 大家帮忙分析mysql的死锁问题[根据下面的innodb status信息]
- java线程状态详解(6种)
- JVM crash. 请帮忙分析一些可能是什么原因
- JDK,JRE,JVM区别与联系
- 远程监控JVM--VisualVM
- 关于Thread类中的start()方法和run()方法
- 对Hadoop task进行profiling的几种方法整理
最新问答
更多- 如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
- linux的常用命令干什么用的
- 由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
- 如何交换返回集中的行?(How to swap rows in a return set?)
- 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
- 使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
- Java中的不可变类(Immutable class in Java)
- WordPress发布查询(WordPress post query)
- 如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
- 是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
- GEP分段错误LLVM C ++ API(GEP segmentation fault LLVM C++ API)
- 绑定属性设置器未被调用(Bound Property Setter not getting Called)
- linux ubuntu14.04版没有那个文件或目录
- 如何使用JSF EL表达式在param中迭代变量(How to iterate over variable in param using JSF EL expression)
- 是否有可能在WPF中的一个单独的进程中隔离一些控件?(Is it possible to isolate some controls in a separate process in WPF?)
- 使用Python 2.7的MSI安装的默认安装目录是什么?(What is the default installation directory with an MSI install of Python 2.7?)
- 寻求多次出现的表达式(Seeking for more than one occurrence of an expression)
- ckeditor config.protectedSource不适用于editor.insertHtml上的html元素属性(ckeditor config.protectedSource dont work for html element attributes on editor.insertHtml)
- linux只知道文件名,不知道在哪个目录,怎么找到文件所在目录
- Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
- 将CouchDB与AJAX一起使用是否安全?(Is it safe to use CouchDB with AJAX?)
- 懒惰地初始化AutoMapper(Lazily initializing AutoMapper)
- 使用hasclass为多个div与一个按钮问题(using hasclass for multiple divs with one button Problems)
- Windows Phone 7:检查资源是否存在(Windows Phone 7: Check If Resource Exists)
- 无法在新线程中从FREContext调用getActivity()?(Can't call getActivity() from FREContext in a new thread?)
- 在Alpine上升级到postgres96(/ usr / bin / pg_dump:没有这样的文件或目录)(Upgrade to postgres96 on Alpine (/usr/bin/pg_dump: No such file or directory))
- 如何按部门显示报告(How to display a report by Department wise)
- Facebook墙贴在需要访问令牌密钥后无法正常工作(Facebook wall post not working after access token key required)
- Javascript - 如何在不擦除输入的情况下更改标签的innerText(Javascript - how to change innerText of label while not wiping out the input)
- WooCommerce / WordPress - 不显示具有特定标题的产品(WooCommerce/WordPress - Products with specific titles are not displayed)