History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: BLZ-150
Type: Feature Request Feature Request
Status: Open Open
Priority: C C
Assignee: Mete Atamel
Reporter: Brian Telintelo
Votes: 25
Watchers: 14
Operations

If you were logged in you would be able to see more operations.
BlazeDS

Create Annotations for use on remote objects to allow more flexibility with blazeds

Created: 05/02/08 09:04 AM   Updated: 05/26/09 12:31 PM
Component/s: Proxy, Security, RemoteObject
Security Level: Public (All JIRA Users )

File Attachments: 1. Zip Archive blazeds-annotations.zip (287 kb)


 PM   Engineering   
Associated Release for Consideration: BlazeDS 3.0.2
Development Owner: jvroom


 Description  « Hide
Attached in the zip file you will find a class called AnnotatedBeanProxy.java, which allows a developer to place annotations on their java remote objects. The annotations class is called FlexField.java, and allows a developer to place the following restrictions on their getters/setters: ReadWrite, ReadOnly, CreateOnly, Transient, Excluded. Each value is described in more detail in the javadoc, but in summary, the options provide a developer both with flexibility and added security on remote objects.

In the zip file you will find:

1. blazeds-annotations15 project: blazeds\trunk\modules\annotations15
2. BeanProxy.patch, a minor change is needed to the BeanProxy class.
3. One actionscript added under sdk\trunk\frameworks\projects\rpc\src\mx\rpc\remoting
4. Two unitests under blazeds\trunk\modules\core\test\java\flex\messaging\io. (Note, to create unit tests I had to build the blazeds-unittests under java 1.5 without creating another project)

Please consider this enhancement to the blazeds code base.

 All   Comments      Sort Order:
Brian Telintelo - [05/02/08 09:18 AM ]
One thing I forgot to mention: On application startup, you would need to add this line of code to register the AnnotatedBeanProxy:

PropertyProxyRegistry.getRegistry().register(IAnnotatedProxy.class, new AnnotatedBeanProxy());

Brian Telintelo - [06/24/08 08:52 PM ]

jvroom - [08/07/08 09:50 PM ]
Still need to review the code but the approach is solid and this should be pretty easy to incorporate. It would only affect classes which implement the new interface.

David Gofman - [11/13/08 12:15 PM ]
from Flex debugger I can see all Excluded or Transient fields and method transfering via network.

@FlexField( fieldType = FlexFieldType.Transient)
@FlexField( fieldType = FlexFieldType.Exclude)

I expect to get fields only what I declared in my AS bean. Now I have to included unexpected fields in my code to avoid
ReferenceError: Error #1056: Cannot create property {FIELD_NAME} on {CLASS_NAME} warnings.

Addition and we include/bind annotation for the public variables in Java code?

Thanks.
David

David Gofman - [11/13/08 01:29 PM ]
Or if I will mark setter as private in AS file I will get warning in my console:

ReferenceError: Error #1074: Illegal write to read-only property {FIELD_NAME} on {CLASS_NAME}

Kumaran Nallore - [05/13/09 11:14 AM ]
If this is a minor enhancement, we could consider this for Beta 2.

François Le Droff - [05/13/09 11:46 AM ]
FYI,

SpringSource just came up with Annotation-based configuration of remote destinations in their Spring BlazeDS Integration 1.0.0.RC1
cf. http://www.springsource.org/node/1393

You may also use flex-contrib-spring (available for quite some time now) : http://fna.googlecode.com/svn/trunk/fna/site/flex-contrib-spring/index.html