[EJB 3.0] - Re: Detach entities - Obtaining a clear pojo
by ALRubinger
Some really nice stuff in there, James. I like how you've removed the need for a base class. I wonder how far we can take this now...
The latest revision of our class is now in package org.hibernate.collection to take advantage of the internal members of other classes in this package - I see some benefits to that design choice. However, there's a method in there requiring @Entity to be imported, and now we've made the EJB3 JARs a dependency on the classpath. I don't think we can do that. :) Hibernate isn't always (and most times isn't) being used strictly within EJB3. I'd like to come up with something that doesn't involve us crossing that boundary.
Which got me to thinking.
Why, if we're using EJB3 to manage our POJO Entities, it is acceptable to return an object with Hibernate classes to the client in the first place? JBoss itself is requiring EJB3 clients to know Hibernate's involved?! Shouldn't the container be removing all of that stuff for us once the object leaves the session/transaction? Then Hibernate would be completely transparent as the storage mechanism for CMP, and the application wouldn't need to know anything about it.
Is it possible for the container to call some form of the utilities we've been talking about once a transaction is committed? It's smart enough to flush all necessary updates via the EntityManager.
Would this break some rule? Once the transaction is done and the EntityManager flushed, session closed - remove all Hibernate Impls from the (now detached) entity. Same case for is the entity crosses a (network | JVM) boundary, leaving the session entirely. Would this prevent a reattach?
Seems like we want something pretty simple:
1) Remote client requests object.
2) EJB3 looks it up, does appropriate (configured) cascades for CMRs, returns it.
3) Client can access all members of the object returned.
Not too much to ask, is it?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969989#3969989
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969989
19 years, 8 months
[JBossWS] - Re: calling webservice Simultaneously
by jimmymani
thomas,
i will explain the business flow.
we have an order application(applet ,http connection)
------------------------------
order request
>>servlet>>EJB>>insert order into database with status 'pending'
>>servlet>>call JbossWS Async>>process order with vendor(takes around 1 mts)>>EJB>>update status to 'Success'
>>servlet--response success message to client just after calling webservice since Async call
---------------------------------------------
since we are using async web service we can give confirmation response to application client with out waiting 1 mt order processing.later we are sending confirmaion mail.
i have tested the application by giving 1000 request using a for loop.
in 1000 , 12 orders did not go after web service.i dont know what happened to those threads(they are still in 'pending' status after 15 hrs.all other threads got finished successfully.obviously no thread is running now)
from log messages i assume that max 3 threads are running simultaneously.
is there any way to increase the number of threads.
also how can i debug the unfinished threads
I am using Fedora core 4 4 Os and jboss 4.0.4GA +jdk 1.5
please help me solve this issue
jimmy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969982#3969982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969982
19 years, 8 months
[JBossWS] - Re: Configure JavaMail in JBoss
by fss
This post should be in: Installation, Configuration & Deployment
you can configure your mail-properties in deploy/mail-service.xml.
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE server>
| <!-- $Id: mail-service.xml,v 1.5.6.1 2005/06/01 06:20:43 starksm Exp $ -->
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- Mail Connection Factory -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
| <attribute name="JNDIName">java:/TESTMail</attribute>
| <attribute name="Configuration">
| <configuration>
| <property name="mail.transport.protocol" value="smtp"/>
| <property name="mail.smtp.host" value="testmail.test.de"/>
| <property name="mail.debug" value="false"/>
| </configuration>
| <depends>jboss:service=Naming</depends>
| </attribute>
| </mbean>
|
| </server>
|
>From your code you get the mailsession with a normal jndi loookup
| Object objref = context.lookup(_mailSessionJNDI);
| Session mail (Session) PortableRemoteObject.narrow(objref, Session.class);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969979#3969979
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969979
19 years, 8 months