[JBoss jBPM] - Re: JBPM 3.2 on tomcat which uses mysql - LOGINI UNSUCCESSFU
by mputz
Please see below the necessary steps to get jBPM 3.2 working with Tomcat and MySQL.
Environment:
Tomcat 6.0.10
MySQL 5.0.15
jBPM 3.2.GA
1. in jbpm-jpdl-3.2.GA/deploy run
ant customize.console.for.tomcat
2. this builds a jbpm-console.war in jbpm-jpdl-3.2.GA/deploy/customized (almost) ready for deployment in TC
3. change the jbpm-console.war/WEB-INF/classes/hibernate.cfg.xml to reflect the following changes:
<hibernate-configuration>
| <session-factory>
|
| <!-- hibernate dialect -->
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
|
| <!-- JDBC connection properties (begin) -->
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm32</property>
| <property name="hibernate.connection.username">jbossjbpm</property>
| <property name="hibernate.connection.password">jbossjbpm</property>
| <!-- JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) ==
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| == DataSource properties (end) -->
| <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
| ...
(Make sure to use the hibernate.connection.driver/url attributes to connect to the db and not the hibernate.connection.datasource property. Also set hibernate.transaction.factory_class to JDBCTransactionFactory instead of the JTATransactionFactory or CMTTransactionFactory which are already in this file.)
4. copy jboss-j2ee.jar (or maybe as well any jar that contains the default javax.transaction package) to jbpm-console.war/WEB-INF/lib. (Note: jboss-j2ee.jar can be found in a standard JBoss AS distribution)
5. Copy the jar containing the mysql jdbc driver to /$CATALINA_HOME/lib
6. Copy the adapted jbpm-console.war to /$CATALINA_HOME/webapps
Give it a try and start Tomcat. You should be able to start the jbpm web application, but for now you cannot successfully log in.
Next thing to do would be to properly configure your security realm. You could either go for the standard file based MemoryRealm and just add the jBPM specific users and roles to /$CATALINA_HOME/conf/tomcat-users.xml, OR...
Setup a JDBCRealm:
7. create a file jbpm-console.xml in /$CATALINA_HOME/conf/Catalina/localhost similar to
<Context>
| <Realm className="org.apache.catalina.realm.JDBCRealm"
| driverName="com.mysql.jdbc.Driver"
| connectionURL="jdbc:mysql://localhost:3306/jbpm32"
| connectionName="jbossjbpm"
| connectionPassword="jbossjbpm"
| userTable="JBPM_ID_USER"
| userNameCol="NAME_"
| userCredCol="PASSWORD_"
| userRoleTable="JBPM_ID_MEMBERSHIP"
| roleNameCol="ROLE_" />
| </Context>
8. Adapt the jBPM user tables to fit in the Tomcat Realm specification. If you have the standard tables (JBPM_ID_USER, JBPM_ID_GROUP, JBPM_ID_MEMBERSHIP) with the default entries already, be sure that the the columns NAME_ and ROLE_ in JBPM_ID_MEMBERSHIP are not NULL. If so you could use the following SQL to update this table:
UPDATE jbpm_id_membership j, jbpm_id_user u
| SET j.NAME_ = u.NAME_
| WHERE j.USER_ = u.ID_
|
| UPDATE jbpm_id_membership j, jbpm_id_group g
| SET j.ROLE_ = g.NAME_
| WHERE j.GROUP_ = g.ID_
Now you should be able to run jBPM default web app in Tomcat and login with the username/password from the db.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032004#4032004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032004
19Â years
[JBoss Seam] - Planning to remove @Begin(id=..)? Help Needed!
by raffaele.camanzo
Hi all,
reading comments to JBSEAM-976 (http://jira.jboss.com/jira/browse/JBSEAM-976) I read this:
anonymous wrote :
| Gavin King [20/Mar/07 08:27 PM]
|
| Anyway, now that we have the now < conversation > stuff in pages.xml, we should deprecate @Begin(id=....).
|
I had a look both at the current documentation and software provided (1.2.0PATCH1) and the roadmap to SEAM 1.3.0BETA1 and I did not find any (but if I'm wrong please tell me how) other thing which makes available such feature (<conversation-begin> seems not to support the id parameter and I did not find other stuff related to the pages.xml to handle it).
anonymous wrote :
| Gavin King [20/Mar/07 08:27 PM]
|
| Right, its not a bug. You should not expect @Begin(join=true, id="#{..}") to do anything if there is an existing long-running conversation. That would be totally evil. You would be switching from one LRC to another.
|
What can I say.. Yes, I would be (and I can with the current Seam code) switching from one LRC to another, and I do not understand why this is evil, indeed, the conversation management of Seam actually detects for me if the user asks for a service he asked for before and automatically resumes the correct conversation and it's data. I cannot base my app on pageflow or navigation rules because I'm trying to provide a set of services to the end user collected in the same *workspace*.
The workspace loads the modules at compile time through a configuration file and some rules, e.g. interfaces, the modules have to adhere to be plugged in the workspace, each module lives in its conversation; the navigation rules are trivial: when a user asks for a service.. do it (display the page -> open a tab.. the workspace looks like a desktop app (everything *se(a)ems* :) to be in the same page) with a list of the services available on the left and a working area on the right, arranged as a tabbed view to allow a fast switch between a service and another).
A service can have more than one instance (same service in more than a tab), this means that I have the same outcome, the same view-id but not the same conversation id.
Each service *needs* a top level long running conversation and cannot work with nested ones because the user can close a tab (end a conversation) and I need a way to remove a conversation without removing all the other conversations nested in it (because if a user asks for the remotion of one service he does not.. and all the others I opened after it).
Is this that evil? And if, why?
Now I would like to say something about the JBSEAM-976 rejection.
anonymous wrote :
| Shane Bryzak [20/Mar/07 08:14 PM]
|
| The submitted test case does not start a new conversation. Besides, this feature is going to become deprecated in favour of the new natural conversation ids feature.
|
If you say from the second call to the @Begin method.. yes, it's true, but it's not the reason of the submitted issue, indeed, from doc's 6.6:
anonymous wrote : Clearly, these example result in the same conversation id every time a particular hotel, blog or task is selected.
| So what happens if a conversation with the same conversation id already exists when the new conversation begins?
| Well, Seam detects the existing conversation and redirects to that conversation without running the
| @Begin method again. This feature helps control the number of workspaces that are created when using workspace
| management.
then I expect that the @Begin method will no more called after the first time (for the same conversation id), but since the 1.1.1GA it does.
I made some tests on it modifying a little the test case: I added another action and a "catchall" action in the pages.xml
| <pages>
| <page view-id="/*" action="#{sessionHandler.checkConversation}"></page>
| </pages>
|
the checkConversation is trivial.. prints on the server the conversation status
| public String checkConversation() {
| String result = null;
|
| Logger.getLogger(this.getClass()).info("<CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: " + (Conversation.instance().isLongRunning() ? "YES" : "NO"));
| Logger.getLogger(this.getClass()).info("<CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: " + (Conversation.instance().isNested() ? "YES" : "NO"));
| Logger.getLogger(this.getClass()).info("<CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: " + Conversation.instance().getId());
| Logger.getLogger(this.getClass()).info("<CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: " + Conversation.instance().getViewId());
| Logger.getLogger(this.getClass()).info("<CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: " + Conversation.instance().getDescription());
|
| return result;
| }
|
and I checked the behaviour, these are the results:
when the app starts the catchall method prints out this:
| 2007-03-27 10:56:13,868 INFO [org.jboss.seam.contexts.Lifecycle] starting up: org.jboss.seam.security.identity
| 2007-03-27 10:56:13,918 INFO [org.jboss.seam.core.Pages] reading pages.xml
| 2007-03-27 10:56:14,376 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 2007-03-27 10:56:14,376 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 2007-03-27 10:56:14,376 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: 1
| 2007-03-27 10:56:14,378 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 2007-03-27 10:56:14,379 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
as expected a temporary conversation is created with id 1 and will not be promoted because there's no conversation to begin.
Case 1 - @Begin(id=#{param.conversationId})
This should cover the case described in the documentation:
anonymous wrote : Clearly, these example result in the same conversation id every time a particular hotel, blog or task is selected.
| So what happens if a conversation with the same conversation id already exists when the new conversation begins?
| Well, Seam detects the existing conversation and redirects to that conversation without running the
| @Begin method again. This feature helps control the number of workspaces that are created when using workspace
| management.
I read, but maybe I'm wrong, when the @Begin method is called more than once on the same id, Seam catches this situation, switches to the long running and does not execute the @Begin method again (but we know that the last is not true), anyway, what happens:
a) I call the @Begin method of the actionone and the catchall (plus the actionone prints) say:
| 2007-03-27 10:57:14,509 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 2007-03-27 10:57:14,509 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 2007-03-27 10:57:14,509 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: 2
| 2007-03-27 10:57:14,509 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 2007-03-27 10:57:14,509 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <ACTIONONE> START CONVERSATION METHOD CALLED
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION ID IS: actionone
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 2007-03-27 10:57:14,558 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
Creating the temporary conversation with id actionone which will be promoted to a long running because we are starting a conversation
b) I call the @Begin method of the actionone again and the catchall says:
| 2007-03-27 10:57:39,699 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: YES
| 2007-03-27 10:57:39,699 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 2007-03-27 10:57:39,699 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: actionone
| 2007-03-27 10:57:39,699 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: /actionone.xhtml
| 2007-03-27 10:57:39,699 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
great found and handled but...
| 2007-03-27 10:45:45,441 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
| 2007-03-27 10:45:45,441 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.actionOne
| 2007-03-27 10:45:45,442 ERROR [org.jboss.seam.jsf.SeamPhaseListener] uncaught exception
| javax.faces.el.EvaluationException: Exception while invoking expression #{actionOne.startConversation}
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
| at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
| at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:106)
| at org.jboss.seam.core.Pages.callAction(Pages.java:466)
| at org.jboss.seam.core.Pages.enterPage(Pages.java:275)
|
|
| ....
|
| Caused by: java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true) on method: start
| Conversation
| at org.jboss.seam.interceptors.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:45)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
|
The programmer did not specify to join them and they did not join.. debug window, then, either I did not understand what's written in 6.6 or the doc is not complete because it does not work without a join.
Case 2 - @Begin(join=true, id=#{param.conversationId})
a) I call the @Begin method of the actionone and the catchall (plus the actionone prints) say:
| 007-03-27 10:49:08,939 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 007-03-27 10:49:08,939 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:08,939 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: 2
| 007-03-27 10:49:08,939 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 007-03-27 10:49:08,939 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
| 007-03-27 10:49:08,991 INFO [it.seam.testcase.ActionOne] <ACTIONONE> START CONVERSATION METHOD CALLED
| 007-03-27 10:49:08,992 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 007-03-27 10:49:08,992 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:08,992 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION ID IS: actionone
| 007-03-27 10:49:08,992 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 007-03-27 10:49:08,992 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
Creating the temporary conversation with id actionone which will be promoted to a long running because we are starting a conversation.
b) I call the @Begin method of the actiontwo and the catchall (plus the actiontwo prints) say:
| 007-03-27 10:49:19,257 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 007-03-27 10:49:19,257 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:19,257 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: 3
| n007-03-27 10:49:19,257 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 007-03-27 10:49:19,257 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <ACTIONTWO> START CONVERSATION METHOD CALLED
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: NO
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION ID IS: actiontwo
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: null
| 007-03-27 10:49:19,279 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
Creating the temporary conversation with id actiontwo which will be promoted to a long running because we are starting a conversation.
c) I call the @Begin method of the actionone again and the catchall (plus the actionone prints) say:
| 007-03-27 10:49:27,811 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: YES
| 007-03-27 10:49:27,811 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:27,811 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: actionone
| 007-03-27 10:49:27,811 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: /actionone.xhtml
| 007-03-27 10:49:27,811 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <ACTIONONE> START CONVERSATION METHOD CALLED
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: YES
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION ID IS: actionone
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: /actionone.xhtml
| 007-03-27 10:49:27,812 INFO [it.seam.testcase.ActionOne] <START CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
Found actionone conversation and switched to (everything handled).
d) I call the @Begin method of the actiontwo again and the catchall (plus the actiontwo prints) say:
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: YES
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION ID IS: actiontwo
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: /actiontwo.xhtml
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.SessionHandler] <CHECK CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <ACTIONTWO> START CONVERSATION METHOD CALLED
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> IS THERE A LONG RUNNING CONVERSATION: YES
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> IS THERE A NESTED CONVERSATION: NO
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION ID IS: actiontwo
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION VIEW ID IS: /actiontwo.xhtml
| 007-03-27 10:49:38,523 INFO [it.seam.testcase.ActionTwo] <START CONVERSATION> LONG RUNNING CONVERSATION DESCRIPTION IS: null
|
Found actiontwo conversation and switched to (everything handled).
Everything seems to work properly except the reason of the issue JBSEAM-976, indeed the @Begin method is called more than once.
I tried also without ids in the @Begin, this causes the creation of a brand new conversation for every call to the @Begin method, but this is not enough for the app I'm building.
I don't know if you plan to remove the join=true related to a @Begin(id=...) but please don't remove the explicit id facility, we wrote a lot of code based on this and the remotion causes the loss of a huge amount of time.
Regards,
Raffaele Camanzo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032002#4032002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032002
19Â years
[JBoss Seam] - Question on Stateless Session Bean
by hasc
Hi,
i have want a stateless session bean to serve Objects to a selectItems component. So far i have adopted a stateful bean from the dvd example to serve the objects.
the code is the following:
@Stateful
| @Name("building")
| public class BuildingListAction implements BuildingList,Serializable{
|
| private List<BuildingType> buildings;
| Map<String,BuildingType> buildingsMap;
|
| @PersistenceContext
| EntityManager em;
|
|
| @Create
| public void loadData() {
| buildings = em.createQuery("select b from BuildingType b")
| .setHint("org.hibernate.cacheable", true)
| .getResultList();
|
| Map<String,BuildingType> results = new TreeMap<String,BuildingType>();
|
| for (BuildingType buildingtype: buildings) {
| results.put(buildingtype.getName(),buildingtype);
| }
|
| buildingsMap = results;
| }
|
| public Map<String,BuildingType> getBuildings(){
|
| return buildingsMap;
| }
|
| public Converter getConverter() {
| return new BuildingConverter(buildings);
| }
|
| @Remove @Destroy
| public void destroy() {}
| }
my question is now what is necessary to make this bean a stateless bean. I stuck at the point where to initialize the list and where to execute the query.
Thanks a lot.
regards,
hasc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031991#4031991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031991
19Â years