I wish to thanks organizers, speakers (excluding me), and attenders for great atmosphere. I don't want to go here with summary of that event (probably Jacek will do it, and for sure better than me). I want to put here only small reminder.
During lightening talk I pointed out the idea of hackathon. During summit there was toast application presented and as it is a example of capabilities of Equinox ready to hack, why not ? So if you want give it a try please contact the authors (details on the wiki).
Showing posts with label equinox. Show all posts
Showing posts with label equinox. Show all posts
Monday, November 24, 2008
Thursday, January 31, 2008
OSGi happy family: UserAdmin
Bundles, wiring, life-cycle and services architecture are not the only part of OSGi specification. Although they're "Core", standard covers also a number of services that we most likely gonna need - like HTTP, position (GPS!), preferences or user management.
User Admin Service comes into action whenever our application is run by multiple users with different privileges. It brings notion of Roles, Users and Groups, who have their properties and credentials. User can perform actions on behalf of selected role if he's one of that role's basic members and has all memberships required by that role. Authorization code looks like this:

Naturally users can come and go at any time, thus we're given actually two services: one for querying users (UserAdmin) and another to track any changes (UserAdminListener).
Generic specification allows for wide range of implementations behind UserAdmin. Equinox's one lays on Preferences (yet another OSGi service).
However UserAdmin is functionally very similar to JAAS, JAAS depends on JDK1.3 which is still to high barier for OSGi.
User Admin Service comes into action whenever our application is run by multiple users with different privileges. It brings notion of Roles, Users and Groups, who have their properties and credentials. User can perform actions on behalf of selected role if he's one of that role's basic members and has all memberships required by that role. Authorization code looks like this:
User user = (User) UserAdmin.getUser("jacek");
Authorization auth = userAdmin.getAuthorization(user);
if (auth.hasRole("CVS_USERS")) {
// ...
}
Naturally users can come and go at any time, thus we're given actually two services: one for querying users (UserAdmin) and another to track any changes (UserAdminListener).
Generic specification allows for wide range of implementations behind UserAdmin. Equinox's one lays on Preferences (yet another OSGi service).
However UserAdmin is functionally very similar to JAAS, JAAS depends on JDK1.3 which is still to high barier for OSGi.
Friday, November 16, 2007
Eclipse-LazyStart and testing plugins
Once again I've made a stupid mistake. I was supposed to add some functionality, and I've started from testing what I did. To my surprise the plugin's start method, i was depended on (lets call it org.hsia), wasn't called. It was called during the normal launch.
My first move was changing org.hsia Eclipse-LazyStart to false.
"The Eclipse-LazyStart header is used to specify if a bundle should be started before the first class or resource is accessed from that bundle" so, I thought if lazy start is false plugin will be started during the platform start - wrong (thanks Chris).
The problem in my case was that I didn't call any of the org.hsia classes. Solution in this case is simple, set org.hsia Eclipse-LazyStart to true and call:
in the test.
Why I've posted that. Maybe you have the same problem, and somentimes is better to lern on sbd else mistakes :)
My first move was changing org.hsia Eclipse-LazyStart to false.
"The Eclipse-LazyStart header is used to specify if a bundle should be started before the first class or resource is accessed from that bundle" so, I thought if lazy start is false plugin will be started during the platform start - wrong (thanks Chris).
The problem in my case was that I didn't call any of the org.hsia classes. Solution in this case is simple, set org.hsia Eclipse-LazyStart to true and call:
@BeforeClass
public static void setUpEditor() {
//force Editor activator to be called
MetricsEditorPlugin.getPlugin();
}
in the test.
Why I've posted that. Maybe you have the same problem, and somentimes is better to lern on sbd else mistakes :)
Subscribe to:
Posts (Atom)