[JBoss Seam] - Re: Basic Seam questions
by lightbulb432
I have some questions about the responses above, but to have a better understanding leading up to it, I need to figure some things out about conversations.
>From the Seam FAQ:
anonymous wrote : Most other web frameworks store all application state in the HTTP session, which is inflexible, difficult to manage and a major source of memory leak. Seam can manage business and persistence components in several stateful scopes: components that only need to live across several pages are placed in the conversation scope; components that need to live with the current user session are placed in the session scope
anonymous wrote : Seam supports fine-grained user state management beyond the simple HTTP session. It isolates and manages user state associated with individual browser window or tab (in contrast, HTTP session is shared across all windows of the same browser).
What is the conversation equivalent of an HTTP session? Where and how is this conversation information actually stored?
How does Seam know that a new tab or window has been opened...I haven't been able to figure it out at all, but it almost seems like magic. I believe it happens with both client- and server-side state-saving. In both cases, how does it actually know of and keep track of all different conversations?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994147#3994147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994147
19 years, 4 months
[JBoss Messaging] - JBoss 5.0beta1: JMS with PostgreSQL
by Juergen.Zimmermann
After unzipping the archive I modified ejb3-timer-service.xml. There was no problem (changes see below). However, I get these error messages in the PostgreSQL console regarding JMS.
ERROR: syntax error at or near "(" at character 74
| STATEMENT: CREATE TABLE JMS_TRANSACTION (TRANSACTIONID BIGINT, BRANCH_QUAL VARBINARY(254), FORMAT_ID INTEGER, GLOBAL_TXID VARBINARY(254), PRIMARY KEY (TRANSACTIONID))
|
| ERROR: syntax error at or near "(" at character 283
| STATEMENT: CREATE TABLE JMS_MESSAGE (MESSAGEID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, COREHEADERS LONGVARBINARY, PAYLOAD LONGVARBINARY, CHANNELCOUNT INTEGER, TYPE TINYINT, JMSTYPE VARCHAR(255), CORRELATIONID VARCHAR(255), CORRELATIONID_BYTES VARBINARY(254), DESTINATION_ID BIGINT, REPLYTO_ID BIGINT, JMSPROPERTIES LONGVARBINARY, PRIMARY KEY (MESSAGEID))
Where can I find these table definitions in 5.0beta1? Any hint is appreciated!
Changes made in ejb3-timer-service.xml:
HSQLDBDelegate -> PostgreSQLDelegate
| qrtz_job_details: BINARY -> oid
| qrtz_triggers: BINARY -> oid
| IS_VOLATILE VARCHAR(1) -> IS_VOLATILE boolean
| qrtz_blob_triggers: BINARY -> oid
| qrtz_calendars: BINARY -> oid
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994145#3994145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994145
19 years, 4 months
[EJB 3.0] - Re: EntityManager is loosing updates
by konstantin.ermakov
Hi!
Thanks a lot for your answer. I actually want not to update the entity from the second thread, but just be sure, that the entity I am reading is up-to-date. And, of course, @Version, optimistic locking does not help me in this case. In general, let's assume the following scenario.
| * In some stateless bean we have the update() method:
|
| | ...
| | void update() {
| | .....
| | entity.setName("Name");
| | manager.flush();
| | sendJMSNotification();
| | };
| |
| * sendJMSNotification() is sending a message to the rich clients, that the entity was updated (in my case, the interceptor is doing it)
| * the client is trying to call manager.find(...) from the same stateless bean, and receives an old data.
|
|
| So, the main question is , if there is a possibility to get postCommit event? IMHO this is important, because the client may receive the notification and in theory, the client does NOT have to access the EJB server, but the database directly. The good example would be a reporting tool, which is refreshing the data after receiving the notification.
|
| Even If I am implementing manager.lock( entity, LockType.READ ), I think it does not work properly in this case - after flush() method the lock is gone.
|
| The only workaround I see is to use the direct JDBC calls, but then it does not make sence to use EJB and Persistence API to work with database.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994144#3994144
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994144
19 years, 4 months
[Security & JAAS/JBoss] - Help! flushAuthenticationCache cann't work!
by joeyli
I use the following code to flush the role, but I use the request.isUserInRole('Anonymous'), the result is still true:
| private void logout() throws Exception {
|
| String domainName = "EatOutDomain";
|
| MBeanServer server = (MBeanServer) MBeanServerFactory
| .findMBeanServer(null).get(0);
| String jaasMgrName= "jboss.security:service=JaasSecurityManager";
| ObjectName jaasMgr = new ObjectName(jaasMgrName);
| Object[] params = { domainName };
| String[] signature = { "java.lang.String" };
| List users = (List) server.invoke(jaasMgr,
| "getAuthenticationCachePrincipals", params, signature);
|
| for (int i = 0; i < users.size(); i++) {
| SimplePrincipal principal = (SimplePrincipal) users.get(i);
|
|
| Object[] pParams = { domainName, principal };
| String[] pSignature = { "java.lang.String", "java.security.Principal"};
| server.invoke(jaasMgr, "flushAuthenticationCache", pParams,
| pSignature);
|
There have only one principal "Anonymous" in domain, and I user getAuthenticationCachePrincipals to get the roles after call "flushAuthenticationCache", the prinipals all clearned.
But, I use the request.isUserInRole("Anonymous") the result is always is true.
How can I clean the request.isUserInRole()? And relogin into web site?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994143#3994143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994143
19 years, 4 months
[EJB 3.0] - how to get username of logged in user
by lorandsm_
Hello,
I use authentication in my application this way:
| Hashtable props = new Hashtable();
|
| props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| props.put(Context.SECURITY_PRINCIPAL, user);
| props.put(Context.SECURITY_CREDENTIALS, password);
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
| props.put(Context.PROVIDER_URL, "jnp://" + readingPropertiesForConnection() + ":" + "1099");
|
| Context ctx = new InitialContext(props);
|
| dispecerat = (DispeceratEntityManager) ctx.lookup("capitol/DispeceratEntityManagerBean/remote");
|
and define the users and roles in the user.properties and roles.properties property files. What I want is to log user actions on the server which is running jboss. So in the business methods of my session bean I want to find out what user is requesting the operation to log the user requesting the operation. How could I do this? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994140#3994140
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994140
19 years, 4 months
[JBoss Seam] - Re: Seam & Maven2
by mzeijen
I have seen it and tested it. I find it great that someone else already made something. The problem is that every Maven2, ready to go, solution that I found is incomplete.
The following stuff is missing or anouyes me.
- It misses several dependencies so that you really need to rebuild the POM files before you get, for example, UnitTesting to work. And they don't solve the dependency problems (thirdparty-all.jar).
- I don't want to be dependent on a non-official, or non-JBoss, repository. What happens if they stop being available in a shot while...
- The archetype generates only a complete project with one war, one jar and one ear file. There aren't any archetypes to create those part separately.
- The archetype is only meant for a JBoss deployment.
- They are already behind, because there aren't any Seam 1.1.0 GA, CR1, CR2 or other releases to be found.
I feel like that there is some 'official' support needed for Maven2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994139#3994139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994139
19 years, 4 months
[JBoss Messaging] - Re: JmsXA vs XAConnectionfactory and durable topic subscript
by mclu
"timfox" wrote : BTW, any reason why you're not just using MDBs?
Hmm Yes!
As I said I have a Topic where messages comes in. These must be processed and send to a queue for each connected system.
I don't want so hardcode his so it must be self maintaining.
My Idea: Have a service which starts or stops durable subscribers on a topic based on registered servers...
The Order is relevant so I can only have one instance per connected Server.
Any small hints how I can handle this with MDB? I would prefer this way because of DLQ handling and transactions...
In the end I need a scaleable system which consumes messages from a topic and send the processed data (different for each server) to connected servers/outgoing queue (which register themself).
One Idea is to have an MDB which handles the message for all servers, but this is not that scaleable, because the order is relevant so I only can have one MDB instance...
"weston.price(a)jboss.com" wrote : <config-property name="Strict">False</config-property>
Thx for this hint but I try be be spec compliant...
/MDB consuming messages
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994137#3994137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994137
19 years, 4 months