public Object unmarshal(Object object, IUnmarshallingContext context)
throws JiBXException {
final DatasourceConfiguration datasource;
final UnmarshallingContext ctx = (UnmarshallingContext) context;
final DataSourceType type = DataSourceType.literal(ctx.toStart());
if (type == DataSourceType.JDBC_DATASOURCE) {
datasource = unmarshalJDBCDatasource(ctx);
} else if (type == DataSourceType.INTERNAL_POOL_DATASOURCE) {
datasource = unmarshalInternalPoolDatasource(ctx);