星期三, 一月 18, 2006
NetBean 5.0 Extension Module 开发指南
http://platform.netbeans.org/tutorials/nbm-server-plugin.html#gettingtoknowthesample
星期五, 十二月 30, 2005
JSF 1.1和JSF 1.2 在支持EL能力上的差别
根据规范:
jsf 1.1
Value Binding Expression Syntax
The syntax of a value binding expression is identical to the syntax of an expression
language expression defined in the JavaServer Pages Specification (version 2.0),
sections 2.3 through 2.9, with the following exceptions:
jsf 1.2
provided by version 2.1 of the JavaServer Pages specification. The EL is described in a
separate specification document delivered as part of the JSP 2.1 spec. Please consult that
document for complete details about the EL.
JSF 1.2中, JSP 1.2和JSP 2.1在EL 引擎上完全统一了,不像以前JSP和JSF是各自的EL引擎。
JSF 1.1中不支持 自定义EL function 的能力。所以必须通过其他技术手段来完成。
jsf 1.1
Value Binding Expression Syntax
The syntax of a value binding expression is identical to the syntax of an expression
language expression defined in the JavaServer Pages Specification (version 2.0),
sections 2.3 through 2.9, with the following exceptions:
- The expression delimiters for a value binding expression are “#{“ and “}” instead
- Value binding expressions do not support EL functions.
jsf 1.2
provided by version 2.1 of the JavaServer Pages specification. The EL is described in a
separate specification document delivered as part of the JSP 2.1 spec. Please consult that
document for complete details about the EL.
JSF 1.2中, JSP 1.2和JSP 2.1在EL 引擎上完全统一了,不像以前JSP和JSF是各自的EL引擎。
JSF 1.1中不支持 自定义EL function 的能力。所以必须通过其他技术手段来完成。
星期三, 十二月 28, 2005
CachedRowSet (New Version) NullPointerException
Simplest Solution is:
Java Forums - CachedRowSet (New Version) NullPointerException: Locale.setDefault(Locale.ENGLISH
Java Forums - CachedRowSet (New Version) NullPointerException: Locale.setDefault(Locale.ENGLISH
MyEclipse Deploy Web Module include External Package in war lib.
Deployment by deploy policy.
http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html
http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html
星期二, 十二月 27, 2005
Eclipse 热键
3.1 有点不同
Eclipse优点:免费、程序代码排版功能、有中文化包、可增
设许多功能强大的外挂、支持多种操作系统(Windows、
Linux、Solaris、Mac OSX)..等等。
发这张帖子的目的是希望能将Eclipse的一些使用技巧集
合起来...欢迎大家继续补充下去(由于Eclipse的版本众多
,希望补充的先进们能顺便说明一下您所使用的版本)
Eclipse网站 http://www.eclipse.org/
(使用版本:Eclipse 2.1.2 Release + 中文化)
热键篇:
Template:Alt + /
修改处:窗口->喜好设定->工作台->按键->编辑->内容辅助。
个人习惯:Shift+SPACE(空白)。
简易说明:编辑程序代码时,打sysout +Template启动键,就
会自动出现:System.out.println(); 。
设定Template的格式:窗口->喜好设定->Java->编辑器->模板。
程序代码自动排版:Ctrl+Shift+F
修改处:窗口->喜好设定->工作台->按键->程序代码->格式。
个人习惯:Alt+Z。
自动排版设定:窗口->喜好设定->Java->程序代码格式制作程序。
样式页面->将插入tab(而非空格键)以内缩,该选项取消勾选
,下面空格数目填4,这样在自动编排时会以空格4作缩排。
快速执行程序:Ctrl + F11
个人习惯:ALT+X
修改处:窗口->喜好设定->工作台->按键->执行->启动前一次的启动作业。
简易说明:第一次执行时,它会询问您执行模式,
设置好后,以后只要按这个热键,它就会快速执行。
..我觉得很顺手^___^
自动汇入所需要的类别:Ctrl+Shift+O
简易说明:
假设我们没有Import任何类别时,当我们在程序里打入:
BufferedReader buf =
new BufferedReader(new InputStreamReader(System.in));
此时Eclipse会警示说没有汇入类别,这时我们只要按下Ctrl+Shift+O
,它就会自动帮我们Import类别。
查看使用类别的原始码:Ctrl+鼠标左键点击
简易说明:可以看到您所使用类别的原始码。
将选取的文字批注起来:Ctrl+/
简易说明:Debug时很方便。
修改处:窗口->喜好设定->工作台->按键->程序代码->批注
视景切换:Ctrl+F8
个人习惯:Alt+S。
修改处:窗口->喜好设定->工作台->按键->窗口->下一个视景。
简易说明:可以方便我们快速切换编辑、除错等视景。
Eclipse优点:免费、程序代码排版功能、有中文化包、可增
设许多功能强大的外挂、支持多种操作系统(Windows、
Linux、Solaris、Mac OSX)..等等。
发这张帖子的目的是希望能将Eclipse的一些使用技巧集
合起来...欢迎大家继续补充下去(由于Eclipse的版本众多
,希望补充的先进们能顺便说明一下您所使用的版本)
Eclipse网站 http://www.eclipse.org/
(使用版本:Eclipse 2.1.2 Release + 中文化)
热键篇:
Template:Alt + /
修改处:窗口->喜好设定->工作台->按键->编辑->内容辅助。
个人习惯:Shift+SPACE(空白)。
简易说明:编辑程序代码时,打sysout +Template启动键,就
会自动出现:System.out.println(); 。
设定Template的格式:窗口->喜好设定->Java->编辑器->模板。
程序代码自动排版:Ctrl+Shift+F
修改处:窗口->喜好设定->工作台->按键->程序代码->格式。
个人习惯:Alt+Z。
自动排版设定:窗口->喜好设定->Java->程序代码格式制作程序。
样式页面->将插入tab(而非空格键)以内缩,该选项取消勾选
,下面空格数目填4,这样在自动编排时会以空格4作缩排。
快速执行程序:Ctrl + F11
个人习惯:ALT+X
修改处:窗口->喜好设定->工作台->按键->执行->启动前一次的启动作业。
简易说明:第一次执行时,它会询问您执行模式,
设置好后,以后只要按这个热键,它就会快速执行。
自动汇入所需要的类别:Ctrl+Shift+O
简易说明:
假设我们没有Import任何类别时,当我们在程序里打入:
BufferedReader buf =
new BufferedReader(new InputStreamReader(System.in));
此时Eclipse会警示说没有汇入类别,这时我们只要按下Ctrl+Shift+O
,它就会自动帮我们Import类别。
查看使用类别的原始码:Ctrl+鼠标左键点击
简易说明:可以看到您所使用类别的原始码。
将选取的文字批注起来:Ctrl+/
简易说明:Debug时很方便。
修改处:窗口->喜好设定->工作台->按键->程序代码->批注
视景切换:Ctrl+F8
个人习惯:Alt+S。
修改处:窗口->喜好设定->工作台->按键->窗口->下一个视景。
简易说明:可以方便我们快速切换编辑、除错等视景。
myEclipse如何增加JSF能力
如何改变JSF默认的错误提示信息.
在JSF 规范里给出的错误提示字典如下:
javax.faces.Message.properties 里.这是Sun JSF IMPL实现里的资源.
myfaces相应的资源名可能有不同.
# ==============================================================================
# SPECIFICATION DEFINED MESSAGES
# ==============================================================================
# ==============================================================================
# Component Errors
# ==============================================================================
javax.faces.component.UIInput.CONVERSION={0}Conversion error occurred.
javax.faces.component.UIInput.REQUIRED=Validation Error\: {0}Value is required.
javax.faces.component.UISelectOne.INVALID=Validation Error\: {0}Value is not valid
javax.faces.component.UISelectMany.INVALID=Validation Error\: {0}Value is not valid
# ==============================================================================
# Validator Errors
# ==============================================================================
javax.faces.validator.NOT_IN_RANGE=Validation Error\: {2}Specified attribute is not between the expected values of {0} and {1}.
javax.faces.validator.DoubleRangeValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of "{0}"
javax.faces.validator.DoubleRangeValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.DoubleRangeValidator.TYPE=Validation Error\: {0}Value is not of the correct type
javax.faces.validator.LengthValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LengthValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LongRangeValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.TYPE=Validation Error\: "{0}" Value is not of the correct type.
# ==============================================================================
# IMPLEMENTATION DEFINED MESSAGES
# ==============================================================================
com.sun.faces.ASSERTION_FAILED=Assertion Failed
com.sun.faces.ATTRIBUTE_NOT_SUPORTED=Attribute ''{0}'' not supported for component type ''{1}''.
com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
com.sun.faces.CANT_CLOSE_INPUT_STREAM=Unable to close input stream.
com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Can''t create Lifecycle for id: ''{0}''.
com.sun.faces.CANT_INSTANTIATE_CLASS=Can''t instantiate class: ''{0}''.
com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
com.sun.faces.CANT_PARSE_FILE=Can''t parse file: ''{0}''.
com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Component Not Found for identifier: ''{0}''.
com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Unable to find component with ID ''{0}'' in view.
com.sun.faces.CONTENT_TYPE_ERROR=Unrecognized Content Type.
com.sun.faces.CONVERTER_NOT_FOUND_ERROR=Converter Not Found for identifier: ''{0}''.
com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=Duplicate component ID ''{0}'' found in view.
com.sun.faces.EMPTY_PARAMETER=Parameter is empty
com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
com.sun.faces.ERROR_GETTING_VALUE_BINDING=Can''t get ValueBinding for value: ''{0}''.
com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value binding expression: ''{0}''.
com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Can''t set managed bean property: ''{0}''.
com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Construction Error: One or more input parameters may be null.
com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Unable to determine FaceServlet mapping for servlet path ''{0}''.
com.sun.faces.FILE_NOT_FOUND=File Not Found for file: ''{0}''.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_STATEMANAGER=Illegal attempt to set StateManager after a response has been generated.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_VIEWHANDLER=Illegal attempt to set ViewHandler after a response has been generated.
com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Characters not allowed.
com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Illegal use of implicit object identifier in lValue mode: ''{0}''
com.sun.faces.ILLEGAL_MODEL_REFERENCE=Illegal Model Reference in this context for expression ''{0}''.
com.sun.faces.ILLEGAL_VIEW_ID=Illegal view ID ''{0}''. The ID must begin with ''/''
com.sun.faces.INVALID_EXPRESSION=Invalid expression: ''{0}''.
com.sun.faces.INVALID_INIT_PARAM=Invalid initialization parameter: ''{0}''.
com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Invalid Message severity ''{0}'' defined in configuration.
com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId already added for id: ''{0}''.
com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId not found for id ''{0}''.
com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
com.sun.faces.MISSING_CLASS_ERROR=Missing Class: Can''t load class ''{0}''.
com.sun.faces.MISSING_RESOURCE_ERROR=Missing Resource: Can''t get ResourceBundle.
com.sun.faces.MODELUPDATE_ERROR=Model Update failure for value ''{0}'' in model''{1}''.
com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Expression Error: Named Object: ''{0}'' not found.
com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Not nested in a UIComponentTag Error for tag with handler class: ''{0}''.
com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent is null for tag with handler class: ''{0}''.
com.sun.faces.NULL_COMPONENT_ERROR=Construction Error: Component argument is null.
com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
com.sun.faces.NULL_CONTEXT_ERROR=Argument Error: Context argument is null.
com.sun.faces.NULL_EVENT_ERROR=Argument Error: Event argument is null.
com.sun.faces.NULL_FORVALUE=Component "{0}" not found
com.sun.faces.NULL_HANDLER_ERROR=Argument Error: Handler argument is null.
com.sun.faces.NULL_LOCALE_ERROR=Argument Error: Locale argument is null.
com.sun.faces.NULL_MESSAGE_ERROR=Argument Error: Message parameter cannot be null
com.sun.faces.NULL_PARAMETERS_ERROR=Argument Error: One or more parameters are null.
com.sun.faces.NULL_REQUEST_VIEW_ERROR=Argument Error: Request View argument is null.
com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Argument Error: ResponseStream argument is null.
com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Argument Error: ResponseView argument is null.
com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Argument Error: ResponseWriter argument is null.
com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId out of bounds for id: ''{0}''.
com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=State Error: RequestView has already been set for this request.
com.sun.faces.SAVING_STATE_ERROR=Error while saving state in ''{0}'': ''{1}''.
com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argument Error: ''{0}'' is not supported for this renderer.
com.sun.faces.TYPECONVERSION_ERROR="{2}" Conversion Error setting value ''{0}'' for ''{1}''.
com.sun.faces.VALIDATION_COMMAND_ERROR=Validation error. ''{0}'' must have value or image attribute.
com.sun.faces.VALIDATION_EL_ERROR=Validation error. Expression invalid for:''{0}''
com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
com.sun.faces.VALIDATOR_NOT_FOUND_ERROR=Validator Not Found for identifier: ''{0}''.
com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cycle reference to managed bean "{0}"
修改为自己的本地语言的 必须要设置.
web.xml里设置的:
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
faces-config.xml文件里的配置部分,如下:
<faces-config>
<application>
<locale-config>
<default-locale>zh</default-locale>
</locale-config>
<message-bundle>org.wxk.HelloWorld</message-bundle>
</application>
</faces-config>
javax.faces.Message.properties 里.这是Sun JSF IMPL实现里的资源.
myfaces相应的资源名可能有不同.
# ==============================================================================
# SPECIFICATION DEFINED MESSAGES
# ==============================================================================
# ==============================================================================
# Component Errors
# ==============================================================================
javax.faces.component.UIInput.CONVERSION={0}Conversion error occurred.
javax.faces.component.UIInput.REQUIRED=Validation Error\: {0}Value is required.
javax.faces.component.UISelectOne.INVALID=Validation Error\: {0}Value is not valid
javax.faces.component.UISelectMany.INVALID=Validation Error\: {0}Value is not valid
# ==============================================================================
# Validator Errors
# ==============================================================================
javax.faces.validator.NOT_IN_RANGE=Validation Error\: {2}Specified attribute is not between the expected values of {0} and {1}.
javax.faces.validator.DoubleRangeValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of "{0}"
javax.faces.validator.DoubleRangeValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.DoubleRangeValidator.TYPE=Validation Error\: {0}Value is not of the correct type
javax.faces.validator.LengthValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LengthValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.MAXIMUM=Validation Error\: {1}Value is greater than allowable maximum of ''{0}''
javax.faces.validator.LongRangeValidator.MINIMUM=Validation Error\: {1}Value is less than allowable minimum of ''{0}''
javax.faces.validator.LongRangeValidator.TYPE=Validation Error\: "{0}" Value is not of the correct type.
# ==============================================================================
# IMPLEMENTATION DEFINED MESSAGES
# ==============================================================================
com.sun.faces.ASSERTION_FAILED=Assertion Failed
com.sun.faces.ATTRIBUTE_NOT_SUPORTED=Attribute ''{0}'' not supported for component type ''{1}''.
com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
com.sun.faces.CANT_CLOSE_INPUT_STREAM=Unable to close input stream.
com.sun.faces.CANT_CREATE_LIFECYCLE_ERROR=Can''t create Lifecycle for id: ''{0}''.
com.sun.faces.CANT_INSTANTIATE_CLASS=Can''t instantiate class: ''{0}''.
com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
com.sun.faces.CANT_PARSE_FILE=Can''t parse file: ''{0}''.
com.sun.faces.COMPONENT_NOT_FOUND_ERROR=Component Not Found for identifier: ''{0}''.
com.sun.faces.COMPONENT_NOT_FOUND_IN_VIEW_WARNING=Unable to find component with ID ''{0}'' in view.
com.sun.faces.CONTENT_TYPE_ERROR=Unrecognized Content Type.
com.sun.faces.CONVERTER_NOT_FOUND_ERROR=Converter Not Found for identifier: ''{0}''.
com.sun.faces.DUPLICATE_COMPONENT_ID_ERROR=Duplicate component ID ''{0}'' found in view.
com.sun.faces.EMPTY_PARAMETER=Parameter is empty
com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
com.sun.faces.ERROR_GETTING_VALUE_BINDING=Can''t get ValueBinding for value: ''{0}''.
com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value binding expression: ''{0}''.
com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Can''t set managed bean property: ''{0}''.
com.sun.faces.FACES_CONTEXT_CONSTRUCTION_ERROR=Construction Error: One or more input parameters may be null.
com.sun.faces.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED=Unable to determine FaceServlet mapping for servlet path ''{0}''.
com.sun.faces.FILE_NOT_FOUND=File Not Found for file: ''{0}''.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_STATEMANAGER=Illegal attempt to set StateManager after a response has been generated.
com.sun.faces.ILLEGAL_ATTEMPT_SETTING_VIEWHANDLER=Illegal attempt to set ViewHandler after a response has been generated.
com.sun.faces.ILLEGAL_CHARACTERS_ERROR=Characters not allowed.
com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Illegal use of implicit object identifier in lValue mode: ''{0}''
com.sun.faces.ILLEGAL_MODEL_REFERENCE=Illegal Model Reference in this context for expression ''{0}''.
com.sun.faces.ILLEGAL_VIEW_ID=Illegal view ID ''{0}''. The ID must begin with ''/''
com.sun.faces.INVALID_EXPRESSION=Invalid expression: ''{0}''.
com.sun.faces.INVALID_INIT_PARAM=Invalid initialization parameter: ''{0}''.
com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Invalid Message severity ''{0}'' defined in configuration.
com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId already added for id: ''{0}''.
com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId not found for id ''{0}''.
com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
com.sun.faces.MISSING_CLASS_ERROR=Missing Class: Can''t load class ''{0}''.
com.sun.faces.MISSING_RESOURCE_ERROR=Missing Resource: Can''t get ResourceBundle.
com.sun.faces.MODELUPDATE_ERROR=Model Update failure for value ''{0}'' in model''{1}''.
com.sun.faces.NAMED_OBJECT_NOT_FOUND_ERROR=Expression Error: Named Object: ''{0}'' not found.
com.sun.faces.NOT_NESTED_IN_FACES_TAG_ERROR=Not nested in a UIComponentTag Error for tag with handler class: ''{0}''.
com.sun.faces.NULL_BODY_CONTENT_ERROR=BodyContent is null for tag with handler class: ''{0}''.
com.sun.faces.NULL_COMPONENT_ERROR=Construction Error: Component argument is null.
com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
com.sun.faces.NULL_CONTEXT_ERROR=Argument Error: Context argument is null.
com.sun.faces.NULL_EVENT_ERROR=Argument Error: Event argument is null.
com.sun.faces.NULL_FORVALUE=Component "{0}" not found
com.sun.faces.NULL_HANDLER_ERROR=Argument Error: Handler argument is null.
com.sun.faces.NULL_LOCALE_ERROR=Argument Error: Locale argument is null.
com.sun.faces.NULL_MESSAGE_ERROR=Argument Error: Message parameter cannot be null
com.sun.faces.NULL_PARAMETERS_ERROR=Argument Error: One or more parameters are null.
com.sun.faces.NULL_REQUEST_VIEW_ERROR=Argument Error: Request View argument is null.
com.sun.faces.NULL_RESPONSE_STREAM_ERROR=Argument Error: ResponseStream argument is null.
com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Argument Error: ResponseView argument is null.
com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Argument Error: ResponseWriter argument is null.
com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId out of bounds for id: ''{0}''.
com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=State Error: RequestView has already been set for this request.
com.sun.faces.SAVING_STATE_ERROR=Error while saving state in ''{0}'': ''{1}''.
com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argument Error: ''{0}'' is not supported for this renderer.
com.sun.faces.TYPECONVERSION_ERROR="{2}" Conversion Error setting value ''{0}'' for ''{1}''.
com.sun.faces.VALIDATION_COMMAND_ERROR=Validation error. ''{0}'' must have value or image attribute.
com.sun.faces.VALIDATION_EL_ERROR=Validation error. Expression invalid for:''{0}''
com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
com.sun.faces.VALIDATOR_NOT_FOUND_ERROR=Validator Not Found for identifier: ''{0}''.
com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cycle reference to managed bean "{0}"
修改为自己的本地语言的 必须要设置.
web.xml里设置的:
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
faces-config.xml文件里的配置部分,如下:
<faces-config>
<application>
<locale-config>
<default-locale>zh</default-locale>
</locale-config>
<message-bundle>org.wxk.HelloWorld</message-bundle>
</application>
</faces-config>
JBoss JavaServerFace 里的配置诡异.
在JBoss 4.0.3 sp1里配置JSF,不用Myfaces用Sun实现的版本。
经常出现以下两个错误:
1.:JavaServerFace:Cannot find FacesContext NullPointer 错误
2.java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
通过web.xml里如下配置,依然不能解决问题。
<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
原因在于我们对这段话的理解,同JSF规范里定义的语义的不一致。
这个mapping只是询问我们,给包含JSF标签的jsp起一个别名
实际的文件后缀都是jsp,如果一个jsp里包含了JSF的标签。就不能按照
普通jsp来解释,必须通过把用同名文件但是后缀是mapping的文件来告诉web container
用JSF来解释这个JSP。
比如:index.jsp包含了JSF标签,如果我们直接引用http://localhost:8080/HelloWorld/index.jsp
则出现Cannot find FacesContext错误。
但如果我们使用:
1.http://localhost:8080/HelloWorld/faces/index.jsp
2.http://localhost:8080/HelloWorld/index.jsf
都能得到正确的结果!!!
错误2:java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
在删除Jboss自带的Myface的执行包后,依然不能解决问题,需要删除tmp和work目录。
重新启动Jboss来解决.
BTW:如果以上配置依然不能解决问题,在tomcat里,需要删除tmp和work目录后,重新
启动,就可以解决这个问题。Opensource的hot deploy的不稳定可见一斑了。:(
诡异!!
经常出现以下两个错误:
1.:JavaServerFace:Cannot find FacesContext NullPointer 错误
2.java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
通过web.xml里如下配置,依然不能解决问题。
<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
原因在于我们对这段话的理解,同JSF规范里定义的语义的不一致。
这个mapping只是询问我们,给包含JSF标签的jsp起一个别名
实际的文件后缀都是jsp,如果一个jsp里包含了JSF的标签。就不能按照
普通jsp来解释,必须通过把用同名文件但是后缀是mapping的文件来告诉web container
用JSF来解释这个JSP。
比如:index.jsp包含了JSF标签,如果我们直接引用http://localhost:8080/HelloWorld/index.jsp
则出现Cannot find FacesContext错误。
但如果我们使用:
1.http://localhost:8080/HelloWorld/faces/index.jsp
2.http://localhost:8080/HelloWorld/index.jsf
都能得到正确的结果!!!
错误2:java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
在删除Jboss自带的Myface的执行包后,依然不能解决问题,需要删除tmp和work目录。
重新启动Jboss来解决.
BTW:如果以上配置依然不能解决问题,在tomcat里,需要删除tmp和work目录后,重新
启动,就可以解决这个问题。Opensource的hot deploy的不稳定可见一斑了。:(
诡异!!
星期四, 十二月 22, 2005
星期三, 十二月 21, 2005
可免费使用的BPEL
Oracle BPEL Engine
http://www.oracle.com/technology/products/ias/bpel/index.html
Jbmp.org
Jboss?Open source Engine.
http://www.oracle.com/technology/products/ias/bpel/index.html
Jbmp.org
Jboss?Open source Engine.
星期六, 十二月 17, 2005
Workflow 和BPM 一些词汇翻译
http://www.ftponline.com/china/print.aspx?TotalPage=7&ID=34#
workflow 和 BPM,Orchestration 翻译为协调或流程编排
非常棒的翻译方法.
workflow 和 BPM,Orchestration 翻译为协调或流程编排
非常棒的翻译方法.
星期三, 十二月 14, 2005
Eclipse 的学习日记
如何关掉Eclipse的自动编译功能?当我想编译的时候手动编译?
从菜单 Window > Preferences > General > Workspace > 去掉Build automatically复选框
当你想编译的时候,按下Ctrl+B功能键盘.或者选择 Project >Build All 菜单命令
小秘密: 当你关闭 "auto compile" 功能的时候最好打开自动保存功能Window > Preferences > General > Workspace > 选择 Save automatically before build
help Search 关键词:compile my Java program
从菜单 Window > Preferences > General > Workspace > 去掉Build automatically复选框
当你想编译的时候,按下Ctrl+B功能键盘.或者选择 Project >Build All 菜单命令
小秘密: 当你关闭 "auto compile" 功能的时候最好打开自动保存功能Window > Preferences > General > Workspace > 选择 Save automatically before build
help Search 关键词:compile my Java program
星期四, 十二月 08, 2005
JBoss JBPM 学习手册(一).
一: 准备:
2.下载JBOSS 4.0.3SP1(最新)
http://www.jboss.org
3.下载 j2sdk 5.0(最新)
http://java.sun.com
4.下载Eclipse(JBOSS提供的Process Designer是Eclipse的Plug-in)
http://www.eclipse.org
5.下载mySQL5.0或其他数据库
http://www.mysql.com
mySQL 5.0 终于具有完全的功能了,包括sub select,Trigger,Procedure,UTF8支持
2005年末是个让人兴奋的年尾,OpenSource Database终于遇到了最强的阻击,
Oracle或Microsoft都推出了有限制的企业Express版本。Oracle 10g Express
或Microsoft SQL 2005 Express都是免费使用,发布安装的,不过数据容量限制在4GB,对大多数论坛或small application 是足够了.
6.下载mySQL或其他数据库JDBC Driver的支持.
7.下载 ant 1.6.2(最新)
http://ant.apache.org/
二:安装
1.安装J2SDK
2.安装 mySQL 建立一个新的database为jbpm
安装Jboss 从jboss docs\examples\jca 目录下 复制mysql-ds.xml 到 jbpm目录下的
deploy目录下,然后打开mysql-ds.xml,修改里面的:
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
主机为localhost和Database Scheme为实际的Scheme,这里为jbpm
3.安装Eclipse 3.1
4.安装ant 1.6.2 ,并将路径加入到系统PATH变量中
5.安装 JBPM 3.06. JBPM安装
展开jbpm-3.0.2.zip 到一个目录下,修改build.properties
修改:ant.home 和 jboss.home 为实际的路径
在当前目录下运行ant,编译.
再运行.ant ?buildfile build.deploy.xml 把jpm 发布到JBOSS目录下.
安装结束后,在jboss server目录下多了一个jbpm的目录,这就是
build.deploy.xml所做的工作。
6. 安装其他数据库
展开jbpm-db-3.0.2.zip,然后修改, jbpm-db-3.0.2.zip.dir\mysql\ hibernate.properties文件中的:
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=root
hibernate.connection.password=
运行 ant mysql.script开始mysql脚本的安装和测试
如果顺利,则全部准备工夫完成了
三.运行
3.1 启动 jboss
命令行 {jboss_home}\bin\run.bat ?c jbpm (注意:启动jbpm下)
注意后台输出屏幕应该没有任何错误信息.
通过:http://localhost:8080/jbpm 出来jbpm的 Web 页面了
四.开发 Hello World工作流.
(pengding……..)
- 下载 以下5个包:
| JBoss jBPM | 3.0.2 | 17.6 MB | 2005-11-17 | LGPL | Notes | Download |
| JBoss jBPM Starters Kit | 3.0.2 | 88.3 MB | 2005-11-17 | LGPL | Notes | Download |
| JBoss jBPM Process Designer Plugin | 3.0.5 | 26.2 MB | 2005-11-17 | LGPL | Notes | Download |
| JBoss jBPM BPEL Extension | 1.0 alpha 3 | 11 MB | 2005-09-05 | Custom | Notes | Download |
| JBPM DB | 3.0.2 | 8.3 MB | 2005-11-17 | Custom | ... | Download |
2.下载JBOSS 4.0.3SP1(最新)
http://www.jboss.org
3.下载 j2sdk 5.0(最新)
http://java.sun.com
4.下载Eclipse(JBOSS提供的Process Designer是Eclipse的Plug-in)
http://www.eclipse.org
5.下载mySQL5.0或其他数据库
http://www.mysql.com
mySQL 5.0 终于具有完全的功能了,包括sub select,Trigger,Procedure,UTF8支持
2005年末是个让人兴奋的年尾,OpenSource Database终于遇到了最强的阻击,
Oracle或Microsoft都推出了有限制的企业Express版本。Oracle 10g Express
或Microsoft SQL 2005 Express都是免费使用,发布安装的,不过数据容量限制在4GB,对大多数论坛或small application 是足够了.
6.下载mySQL或其他数据库JDBC Driver的支持.
7.下载 ant 1.6.2(最新)
http://ant.apache.org/
二:安装
1.安装J2SDK
2.安装 mySQL 建立一个新的database为jbpm
安装Jboss 从jboss docs\examples\jca 目录下 复制mysql-ds.xml 到 jbpm目录下的
deploy目录下,然后打开mysql-ds.xml,修改里面的:
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
主机为localhost和Database Scheme为实际的Scheme,这里为jbpm
3.安装Eclipse 3.1
4.安装ant 1.6.2 ,并将路径加入到系统PATH变量中
5.安装 JBPM 3.06. JBPM安装
展开jbpm-3.0.2.zip 到一个目录下,修改build.properties
修改:ant.home 和 jboss.home 为实际的路径
在当前目录下运行ant,编译.
再运行.ant ?buildfile build.deploy.xml 把jpm 发布到JBOSS目录下.
安装结束后,在jboss server目录下多了一个jbpm的目录,这就是
build.deploy.xml所做的工作。
6. 安装其他数据库
展开jbpm-db-3.0.2.zip,然后修改, jbpm-db-3.0.2.zip.dir\mysql\ hibernate.properties文件中的:
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=root
hibernate.connection.password=
运行 ant mysql.script开始mysql脚本的安装和测试
如果顺利,则全部准备工夫完成了
三.运行
3.1 启动 jboss
命令行 {jboss_home}\bin\run.bat ?c jbpm (注意:启动jbpm下)
注意后台输出屏幕应该没有任何错误信息.
通过:http://localhost:8080/jbpm 出来jbpm的 Web 页面了
四.开发 Hello World工作流.
(pengding……..)
星期五, 十一月 18, 2005
Javascript:getElementByID getElementByName
得到当前form元素的表现层对象。
可以通过.getElementByID
或.document.forms['name'].elements['tagname']
来得到
可以通过.getElementByID
或.document.forms['name'].elements['tagname']
来得到
星期六, 十一月 05, 2005
Tips:不能预先确定的动态数组.
Q:需要一个长度不固定,完全需要动态变化的array对象。
A:使用:java.io.ByteArrayOutputStream
最后使用ByteArrayOutputStream.toByteArray,得到最终的数组
典型代码:
protected Class getClassFromJar(InputStream is, String className) throws Exception
{
System.out.println("getClassFromJar try find "+className);
JarInputStream jis = new JarInputStream(is);
String rname = className;
rname = rname.replace ('.', '/') + ".class";//重要,必须还原为目录格式
JarEntry entry=null;
Class tmp=null;
while ((entry = jis.getNextJarEntry()) != null)
{
System.out.println(entry.getName());
if(entry.isDirectory()) continue;
if(entry.getName().equals(rname))
{
System.out.println("find it!!!!");
// int size=(int)entry.getSize();
// if(size==-1)throw new Exception("size is -1");
// System.out.println("size:"+size);
int status;
byte[] b= new byte[4096];
ByteArrayOutputStream buf = new ByteArrayOutputStream();
while((status = jis.read(b))!=-1)
{
System.out.println("read ..."+status);
buf.write(b,0,status);
}
System.out.println("All Read is "+buf.size());
byte[] classByte= buf.toByteArray();
buf.close();
tmp = defineClass(className,classByte,0,classByte.length);
jis.close();
return tmp;
}
}
return tmp;
}
A:使用:java.io.ByteArrayOutputStream
最后使用ByteArrayOutputStream.toByteArray,得到最终的数组
典型代码:
protected Class getClassFromJar(InputStream is, String className) throws Exception
{
System.out.println("getClassFromJar try find "+className);
JarInputStream jis = new JarInputStream(is);
String rname = className;
rname = rname.replace ('.', '/') + ".class";//重要,必须还原为目录格式
JarEntry entry=null;
Class tmp=null;
while ((entry = jis.getNextJarEntry()) != null)
{
System.out.println(entry.getName());
if(entry.isDirectory()) continue;
if(entry.getName().equals(rname))
{
System.out.println("find it!!!!");
// int size=(int)entry.getSize();
// if(size==-1)throw new Exception("size is -1");
// System.out.println("size:"+size);
int status;
byte[] b= new byte[4096];
ByteArrayOutputStream buf = new ByteArrayOutputStream();
while((status = jis.read(b))!=-1)
{
System.out.println("read ..."+status);
buf.write(b,0,status);
}
System.out.println("All Read is "+buf.size());
byte[] classByte= buf.toByteArray();
buf.close();
tmp = defineClass(className,classByte,0,classByte.length);
jis.close();
return tmp;
}
}
return tmp;
}
星期日, 十月 30, 2005
One-Jar Open source
最近因为弄JNI,必须解决一个技术问题,就是自动加载
包含在可执行Jar中的动态库(.dll或.so).
这个问题2年前就碰到过类似的问题,不过当时是用编写脚本用 -
Xbootclasspath/a:作为加载第三方不包含在Jar文件中的class的方法。
虽然可以解决问题,很不完美。
后来用System.load来动态加载JNI的动态库,解决了这个问题后。
突然想到这个老问题,继续尝试以前想到的用ClassLoader来解决这个问题。
具体方法是:把包含在jar文件中的第三方jar包,展开到当前目录或系统临时目录
下,通过loadClass来加载这些包。
任务将近完成的时候,觉的这种方法依然要依赖用户的运行环境,如果是个限制
严格的环境,在临时展开这些class的时候,会出现运行时RuntimeException
终于在google发现了一个 one-jar的方法,是直接通过InputStream来加载
class,这是很大的进步了。仔细看看作者的实现。
http://one-jar.sourceforge.net/
包含在可执行Jar中的动态库(.dll或.so).
这个问题2年前就碰到过类似的问题,不过当时是用编写脚本用 -
Xbootclasspath/a:作为加载第三方不包含在Jar文件中的class的方法。
虽然可以解决问题,很不完美。
后来用System.load来动态加载JNI的动态库,解决了这个问题后。
突然想到这个老问题,继续尝试以前想到的用ClassLoader来解决这个问题。
具体方法是:把包含在jar文件中的第三方jar包,展开到当前目录或系统临时目录
下,通过loadClass来加载这些包。
任务将近完成的时候,觉的这种方法依然要依赖用户的运行环境,如果是个限制
严格的环境,在临时展开这些class的时候,会出现运行时RuntimeException
终于在google发现了一个 one-jar的方法,是直接通过InputStream来加载
class,这是很大的进步了。仔细看看作者的实现。
http://one-jar.sourceforge.net/
星期六, 十月 29, 2005
JNI 常见问题 FAQ.
JNI 常见问题 FAQ.
JNIEnv是个系统的工具对象(ToolKit).
可以使用下列语法得到返回一个Java String
C 语法:
jstring str = (*env)->NewStringUTF(env,(char *)变量);
- 如何从JNI返回一个字符串?
JNIEnv是个系统的工具对象(ToolKit).
可以使用下列语法得到返回一个Java String
C 语法:
jstring str = (*env)->NewStringUTF(env,(char *)变量);
Java JNI 基本使用说明
Java JNI 解说.
步骤:
class TestNative {
private native void print(); //注意方法声明
public static void main ( String [ ] args ) {
new TestNative().print(); //注意调用方法
}
static {
System.loadLibrary ("helloWorld"); // 注意Load 动态库的语法.
}
}
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class TestNative */
#ifndef _Included_TestNative
#define _Included_TestNative
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: TestNative
* Method: print
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_TestNative_print
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
注意红色的: Java_TestNative_print 函数名的生成是按照JNI规范产生的
模式为Java_类名_方法名.
#include "TestNative.h" //这行必须加入
JNIEXPORT void JNICALL
Java_TestNative_print ( JNIEnv* env, jobject obj )
{
printf ( "Hello, Native!\n" ) ;
return ;
}
[root]# gcc TestNative.c -o libhelloWorld.so -shared -I /usr/java/j2s
dk1.4.2/include/linux/ -I /usr/java/j2sdk1.4.2/include/
Window:..
export LD_LIBRARY_PATH= .so文件所在目录名
步骤:
- 先建立一个标准java Class
class TestNative {
private native void print(); //注意方法声明
public static void main ( String [ ] args ) {
new TestNative().print(); //注意调用方法
}
static {
System.loadLibrary ("helloWorld"); // 注意Load 动态库的语法.
}
}
- 注意:根据Java JNI 规范,
- 生成C用头文件
- javac TestNative.java
- javah ?jni TestNative
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class TestNative */
#ifndef _Included_TestNative
#define _Included_TestNative
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: TestNative
* Method: print
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_TestNative_print
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
注意红色的: Java_TestNative_print 函数名的生成是按照JNI规范产生的
模式为Java_类名_方法名.
- 编辑对应的C代码:
#include "TestNative.h" //这行必须加入
JNIEXPORT void JNICALL
Java_TestNative_print ( JNIEnv* env, jobject obj )
{
printf ( "Hello, Native!\n" ) ;
return ;
}
- 编译源程序(注意生成的动态库的命名规则
[root]# gcc TestNative.c -o libhelloWorld.so -shared -I /usr/java/j2s
dk1.4.2/include/linux/ -I /usr/java/j2sdk1.4.2/include/
Window:..
- 设置路径
export LD_LIBRARY_PATH= .so文件所在目录名
- java TestNative 得到结果
星期四, 十月 27, 2005
JVM Memory Model
JVM Memory Model
Thread可执行的操作:
use(使用)
assign(赋值)
load
store,
lock,
unlock
use和assign
Main Memory SubSystem 可执行的操作:
read,
write,
lock,
unlock
这些操作都是Atomic的操作
Main Memory:主内存
Working Memory:工作区内存
关于这些Operation的定义说明:
(image placeholder)
http://java.sun.com/docs/books/vmspec/2nd-edition/html/Threads.doc.html
8.7 Rules for volatile Variables
如果一个变量被申明为volatile,哪个对操作这个变量的Thread有多了额外的约束
T 是个线程.
V和W是Volatile变量
Thread可执行的操作:
use(使用)
assign(赋值)
load
store,
lock,
unlock
use和assign
Main Memory SubSystem 可执行的操作:
read,
write,
lock,
unlock
这些操作都是Atomic的操作
Main Memory:主内存
Working Memory:工作区内存
关于这些Operation的定义说明:
- use 动作:使用一个Thread的use 动作把当前Thread里的变量内容传送到Thread的执行引擎.这个动作发生在Thread在JVM指令中使用该变量的值的时候.
- assign 动作:赋值 一个Thread的assign动作 传送Thread引擎的变量值到Thread的copy变量里.这个动作在Thread执行JVM赋值指令的时候.
- read 动作:读 主内存用稍侯的load动作传送原版变量的值到thread的工作区内存.
- load 动作:载入 一个Thread把一个值从主内存通过read动作放到thread的工作区的复制的变量
- store动作: 存储 一个Thread的存储动作是用下面的Write操作传送Thread工作区的复制变量值到主内存。
- write 动作:写入 主内存的写入动作是通过store动作放一个值从Thread工作区复制变量到在主内存里的原版变量里
- lock 动作:缩定 Thread和主内存紧密偶合的同步 lock动作造成Thread得到了一个特定锁的声明
- unlock 动作:解锁 Thread和猪内存的紧密同步,让Thread释放关于特定锁的声明
(image placeholder)
http://java.sun.com/docs/books/vmspec/2nd-edition/html/Threads.doc.html
8.7 Rules for volatile Variables
如果一个变量被申明为volatile,哪个对操作这个变量的Thread有多了额外的约束
T 是个线程.
V和W是Volatile变量
- A use operation by T on V is permitted only if the previous operation by T on V was load, and a load operation by T on V is permitted only if the next operation by T on V is use. The use operation is said to be "associated" with the read operation that corresponds to the load.
- A store operation by T on V is permitted only if the previous operation by T on V was assign, and an assign operation by T on V is permitted only if the next operation by T on V is store. The assign operation is said to be "associated" with the write operation that corresponds to the store.
- Let action A be a use or assign by thread T on variable V, let action F be the load or store associated with A, and let action P be the read or write of V that corresponds to F. Similarly, let action B be a use or assign by thread T on variable W, let action G be the load or store associated with B, and let action Q be the read or write of W that corresponds to G. If A precedes B, then P must precede Q. (Less formally: operations on the master copies of volatile variables on behalf of a thread are performed by the main memory in exactly the order that the thread requested.)
订阅:
评论 (Atom)
