View Poll Results: If you read it, did you find DirectJNgine User's Guide adequate?
- Voters
- 54. You may not vote on this poll
-
Yes
40 74.07% -
No
14 25.93%
-
14 Mar 2012 5:33 AM #411
Direct Store with paging grid in ExtJs4and DJN 2.0
Direct Store with paging grid in ExtJs4and DJN 2.0
It is mentioned in the DJN 2 user guide it donot support "baseparams" and we must adapt a way of form Submit/api ...
how ever I cannot get the Idea of how to use api?submit with a "direct Store" and directFn when using DJN ...
Is any body out there already developed a "Paging grid" or a buffered Grid ? what way is adapted to pass parameters to server's java function.
please share the code of the store in java script if possible..
Any guidance will be appriciated!
-
19 Mar 2012 11:12 AM #412
Problem with many war in jboss
Problem with many war in jboss
Hi,
thank for your directjngine lib.
i've a problem... when i deploy two war in jboss as7 (two part of the same application) and i try to call, using direct, the slave war from the main war i've got this error:
{"tid":1,"action":"MyTestAction","method":"get","message":"RequestException: No action registered as 'MyTestAction'","where":"","type":"exception"}
i've defined the action "MyTestAction" in the slave web.xml.
please help me...
Paolo
-
20 Mar 2012 5:27 AM #413
Maybe you are not providing the compiled classes + configuration in both wars? If that's the case, DJN has no way to know what calls are avaible, nor what they look like.
Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
5 Apr 2012 3:18 PM #414
I see DJN 2.0 alpha released in july 2011. Any idea about DJN 2.0 final release schedule?
-
14 May 2012 6:03 AM #415
DirectJNgine 2.1 final is out!
DirectJNgine 2.1 final is out!
DJN 2.1 final is out.
The 2.0 alpha 1 ended up being production ready, as I said in other posts in which I recommended to use it for production. But I think we all needed to see the "final" suffix, so here it is
I should have removed the 'alpha 1' suffix a long time ago, if only to provide reassurance, mea culpa. The released version just adds some additional tests and I made sure it passes all tests for ExtJs 4.1.0. Some new change in 4.1.0 broke a test that used to work in 4.0.x, and I had to change the test code accordingly.
The bump from 2.0 to 2.1 is to emphasize the fact that this one works with ExtJs 4.1.0, which is the version I feel we all should be using, due to the many fixes and improvements it sports.
As always, you can get DJN at http://code.google.com/p/directjngine/downloads
Regards!Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
17 May 2012 8:04 AM #416
Post about the future of DJN 2.1 (I)
Post about the future of DJN 2.1 (I)
Now that 2.1 is out and I have found some spare time for DJN (!), I've been thinking hard about new features.
In order to share my ruminations with the community I have publihed some of them at http://softdevbuilttolast.wordpress....tjngine-2-1-i/. I will soon follow with more posts.
Be aware that these are just ruminations, though
As always, comments and suggestions will be welcome.Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
18 May 2012 1:59 AM #417
DirectJNgine Security Manager
DirectJNgine Security Manager
Hi Pedro,
I'm exploring your directJNgine library and I have to say that I really like it! It really simplifies every day development, and I wanted to thank you for all the time you have spent on it providing a great library to all the world! The docs are brilliant and I've configured everything really fastly. Now that I have my remote methods (marked with the convenient @DirectMethod), that are usable from the client side, I was wondering how to implement a convenient way to manage the authorization level of each method.
In the perfect world I'd like to accomplish something like this:
I saw that I can access to the DirectJNgine servlet's context and session, but I wanted to ask you how do you implement the authentication internally and if it's possible to plug-in an external class to the DirectJNgine's servlet that implements a way of defining each access level. Ideally I think that the security manager has to be called by the DirectJNgine's servlet during the internal routing process, deciding whether to allow method execution or provide a standard exception (such as "403: forbidden") that is sent to the client. What do you think about this? I'm curious to hear your opinion.Code:@DirectMethod @AccessLevel( level="Admin") public String something()
Looking forward to hear from you,
Alex
-
18 May 2012 3:28 AM #418
Thanks!
I think that tinkering with DJN to handle security concerns is not a good idea, security is an orthogonal concern.
As a *quick* solution, you might be able to solve your issue by letting some other element check permisions and raise a security exception. DJN will pass it to the client with a message in an standard format that includes the exception type and its message.
Note that the message is referred to the "cause exception", not the last one in a exception stack, making it meaningful for that kind of processing .Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/
-
18 May 2012 6:52 AM #419
Hi Pedro,
I already have developed my own Security manager that handles method-level permissions, but I need to intercept the calls to my method before they happen. By analyzing your source code, I've found that
every server side method is callled by the code on the line 144 of DispatcherBase class, that does the following:
The result is a generic Object. That made me thought about a way to implement a more flexible security manager without patching your library.Code:132 protected Object invokeMethod(RegisteredMethod method, Object actionInstance, Object[] parameters) { ... 136 Method javaMethod = method.getMethod(); 137 Object result; ... 144 result = javaMethod.invoke( actionInstance, parameters ); ... 160 return result; 161 }
My idea is to replace the line 144 with the following one:
in which securityClass is an instance of a class that implements the public interface SecurityManager defined as follows:Code:result = securityClass.invoke(javaMethod, actionInstance, parameters);
By doing this, you could implement the default security manager bundled in DJN that simply does:Code:public interface SecurityManager { public Object invoke(Method method, Object actionInstance, Object[] parameters); }
Then a configuration parameter could be added to the web.xml file in which the developer could specify if it's going to use its own implementation of the security manager.Code:public class DjnDefaultSecurityManager implements SecurityManager { @Override public Object invoke(Method method, Object actionInstance, Object[] parameters) { return method.invoke( actionInstance, parameters ); } }
The configuration parameter could be something like this:
If this parameter is not defined in the web.xml, the default DJN security manager class will be used.Code:<init-param> <param-name>DjnSecurityManager</param-name> <param-value>org.abusinessname.CustomSecurityManager</param-value> </init-param>
In this way DJN delegates to the developer the task of implementing its own security manager, but provides a more convenient and elegant way to do it.
What do you think about this proposal? I think that it's a minimal tweak to your code that could provide a powerful feature to your library.
Alex
-
19 May 2012 12:22 AM #420
Thanks for your proposal!
I prefer not to add security management to DJN, as I consider it an orthogonal concern -more so because there are so many ways to handle security, think Spring Security, JBoss Picketlink or JAAS.
Regards,Pedro Agulló, Barcelona (Spain)
Agile team building, consulting, training & development
DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/


Reply With Quote
