Add WebSocket support with Jakarta WebSocket integration

- Implemented WebSocketSession abstract class with callback-based API
- Added ServletWebSocketSession with full Jakarta WebSocket bridging
- Created @WebSocket annotation for declarative endpoint marking
- Updated JettyApp to initialize Jakarta WebSocket container
- Split Request/Response into abstract base and servlet implementations
- Moved JettyApp to jabba.servlet package
- Moved annotations to jabba.decor package
- Added comprehensive WebSocket test suite (5 tests, all passing)
- Updated README.md with WebSocket documentation and examples
- All 31 tests passing (async, sync, security, websocket, database)
- Fixed spelling errors in README.md
This commit is contained in:
Amer Agovic
2026-01-07 08:57:12 -06:00
parent 222d2d886f
commit 5f36b3d3e2
42 changed files with 3868 additions and 789 deletions
+10 -1
View File
@@ -81,7 +81,16 @@ public class Entity extends Hdr{
try {
String sf_name=field.getName();
Field slot=(Field) field.get(cls);
slot.setId(sf_name);
// Only set ID if not already set (allows explicit database column name mapping)
// Use Field's name (database column name) if available, otherwise use Java field name
if(slot.getId()==null || slot.getId().isEmpty()){
String dbName=slot.getName(); // This is the name passed to Field constructor (e.g., "created_on")
if(dbName!=null && !dbName.isEmpty()){
slot.setId(dbName);
}else{
slot.setId(sf_name); // Fallback to Java field name
}
}
slot.setPosition(position0+slots.size());
slots.add(slot);
//System.out.println(sf_name+":"+slot+" atpos:"+slot.getPosition());