A context-aware group management middleware to support resource sharing in MANET environments