Advanced collsion handling - box vs orientedbox

so far, i've been ably to handle everyhting with this simple method:

 private static void adjustEntityPosition(final DecoratedEntity p_entity, final BoundingVolume p_worldBound) {
    final Vector3f l_extent = ((BoundingBox) p_worldBound).getExtent(ms_tmp);
    final Vector3f l_center = p_worldBound.getCenter();

    final CurrentBounds l_currentBounds = p_entity.getCurrentBounds();

    final float l_minX = l_currentBounds.getCurrentMinX();
    final float l_reducedExtentX = l_extent.x;
    final float l_objMaxX = l_center.x + l_reducedExtentX;
    final float l_maxX = l_currentBounds.getCurrentMaxX();
    final float l_objMinX = l_center.x - l_reducedExtentX;
    final float l_xDiff = evaluateDifference(l_minX, l_objMaxX, l_maxX, l_objMinX);

    final float l_minZ = l_currentBounds.getCurrentMinZ();
    final float l_reducedExtentZ = l_extent.z;
    final float l_objMaxZ = l_center.z + l_reducedExtentZ;
    final float l_maxZ = l_currentBounds.getCurrentMaxZ();
    final float l_objMinZ = l_center.z - l_reducedExtentZ;
    final float l_zDiff = evaluateDifference(l_minZ, l_objMaxZ, l_maxZ, l_objMinZ);

    final float l_minY = l_currentBounds.getCurrentMinY();
    final float l_objMaxY = l_center.y + l_extent.y;
    final float l_maxY = l_currentBounds.getCurrentMaxY();
    final float l_objMinY = l_center.y - l_extent.y;
    final float l_yDiff = evaluateDifference(l_minY, l_objMaxY, l_maxY, l_objMinY);

    final float l_absX = FastMath.abs(l_xDiff);
    final float l_absY = FastMath.abs(l_yDiff);
    final float l_absZ = FastMath.abs(l_zDiff);
    if (l_absZ > l_absX && l_absY > l_absX) {
      ms_tmp1.set(l_xDiff, 0.0F, 0.0F);
    } else if (l_absZ < l_absY) {
      ms_tmp1.set(0.0F, 0.0F, l_zDiff);
    } else {
      ms_tmp1.set(0.0F, l_yDiff, 0.0F);
      if (l_yDiff >= 0.0F) {
        p_entity.setTouchingObjWithFeet();
      }
    }
    p_entity.moveAbsoluteBy(ms_tmp1);
  }

  private static float evaluateDifference(
     final float p_min,
     final float p_objMax,
     final float p_max,
     final float p_objMin) {
    final float l_diff1 = p_objMax - p_min;
    final float l_diff2 = p_objMin - p_max;
    final float l_Ret;
    if (FastMath.abs(l_diff1) > FastMath.abs(l_diff2)) {
      l_Ret = l_diff2;
    } else {
      l_Ret = l_diff1;
    }
    return l_Ret;
  }



in case it scared you:
it takes 2 worldbounds, assuming they are boundingboxes, and assumes one of them as not movable. the other one is moved along the x, y and z axis, whichever allows the shortest movement so that worldbound one does no longer intersect with worldbound two.
this isn't sufficient anymore. the static box needs to be oriented if i do not want my objects to become a rather squary place.

the same should be done for orientedboxes, but i'm not sure who to do it. according to me experience with moving cookies in the kitchen to help me visualize the problem, it *should* be enough to check which of the boxes has an edge inside the other, then rotate the whole scene so that the pierced box is axis aligned and then apply the algorithm above to the rotated box and the other's box boundingbox.

before i spent hours, days and weeks implementing this hell of an algorithm - has anyone done this before? how do other games solve this problem? should i use a physics engine?