In your hibernate config file enter this:
Code:
<sql-query name="some_name" callable="true">
<return alias="u" class="class_name">
<return property name="id" column="user_id"/>
...
</return>
{call procedure_name(?,:bind_parameter)}
</sql-query>
If the class_name's properties are the same as their column names then you can leave the <return property="" column="" />s out like this
Code:
<sql-query name="some_name" callable="true">
<return alias="some_alias" class="class_name">
{call procedure_name(?,:bind_parameter)}
</sql-query>
? is your output parameter from the sproc and then you have you bind parameter that you pass in (you can also use positional ?)
You call the sproc in your servlet like this
Code:
Query q = session.getNamedQuery("some_name");
q.setParameter("bind_parameter","string or number");
List result = q.list();
[/code]