[JBoss-user] Please Help Me

2002-12-24 Thread Dhiraj Ramakrishnan
Hi all ,
I really hope i will get a reply this time i have been struggling with this
for quite some time


My application uses a JTree to help ease the navigation through the whole
application.

The problem i am facing is that , it is authenticating the users present in
the LDAP Server. But when it is trying to
initialize the applet it is asking once again for the username and password
(saying enter the network password!).   There even if i give junk values
it accepts ... even if i don't give any values it makes no difference. I
have to click
on that login pop up at least 10 times , then it allows me to enter the
application, else the left side JTree Appletdoesn't show up at all.

Because of this my application is not getting authenticated. It is saying
the principal is null ... see the Exception,

java.lang.SecurityException: Authentication exception, principal=
at
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityI
nterceptor.java:173)
  at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:94)
at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
  at
org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer
.java:300)
at org.jboss.ejb.Container.invoke(Container.java:730)
  at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77
)
at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
at
org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)


One possible explanation that i got is that it is trying to get all the
jars needed by the applet from the server ,
hence is trying to authenticate each time. Is there any way to avoid this??

Why is it trying to authenticate the applet in the first place.Since i have
already defined all the permissions for the applet in the Policy file.

I hope i have been clear in explaining my problem to you. Please let me
know
If there is some other configuration i need to do.

Wish You a Merry Chirstmas

Thank You
Dhiraj Ramakrishnan



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Please help me! Transaction problem

2002-10-25 Thread Greg Turner
Here is how to deal with this:

http://www.tuxedo.org/~esr/faqs/smart-questions.html



Gene Ge wrote:


Someone please help me, I have asked this question many times and 
still not get any answer yet! I also searched in archives but get no 
answer.
_ 

11:43:14,093 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Application Error: tried to enter Stateful 
bean with different transaction context
   at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.ja 

   at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107) 

   at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178) 

   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
   at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
   at 
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380) 

   at 
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301) 

   at 
org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41) 

   at $Proxy270.setStudentData(Unknown Source)
   at 
com.bit.job.actions.EditStudentInfoAction.execute(EditStudentInfoAction.java:97) 

   at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437) 

   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264) 

   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1115)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:476)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:284) 

   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
   at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544) 

   at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
   at org.mortbay.http.HttpServer.service(HttpServer.java:875)
   at org.jboss.jetty.Jetty.service(Jetty.java:541)
   at 
org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
   at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
   at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
   at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
   at java.lang.Thread.run(Thread.java:536)
_ 


Who can tell me how to deal with this?
If I retry to invoke the method for some times, the method could 
execute successfully.
So??

thanks for any help

Gene

_
Get a speedy connection with MSN Broadband.  Join now! 
http://resourcecenter.msn.com/access/plans/freeactivation.asp



---
This sf.net email is sponsored by: Influence the future of Java(TM) 
technology. Join the Java Community Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



--
Greg Turner, JBoss Authorized Consultant

Tiburon Enterprise Systems
http://www.tiburon-e-systems.com
Box 1171
Tiburon, CA 94920
415-927-2543






---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Please help me! Transaction problem

2002-10-24 Thread Gene Ge
Someone please help me, I have asked this question many times and still not 
get any answer yet! I also searched in archives but get no answer.
_
11:43:14,093 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with 
different transaction context
   at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.ja
   at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
   at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
   at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
   at 
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
   at 
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
   at 
org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)
   at $Proxy270.setStudentData(Unknown Source)
   at 
com.bit.job.actions.EditStudentInfoAction.execute(EditStudentInfoAction.java:97)
   at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1115)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:476)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:284)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
   at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
   at org.mortbay.http.HttpServer.service(HttpServer.java:875)
   at org.jboss.jetty.Jetty.service(Jetty.java:541)
   at org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
   at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
   at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
   at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
   at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
   at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
   at java.lang.Thread.run(Thread.java:536)
_

Who can tell me how to deal with this?
If I retry to invoke the method for some times, the method could execute 
successfully.
So??

thanks for any help

Gene

_
Get a speedy connection with MSN Broadband.  Join now! 
http://resourcecenter.msn.com/access/plans/freeactivation.asp



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Please help me! Transaction problem

2002-10-24 Thread Dmitri Colebatch
how are you creating/storing the stateful bean?

one possible cause is you have one stateful bean in the action class, and
multiple requests are using the same instance

other than that, I think you need to provide some more info... show the code
that actually creates and calls the sfsb...

hth
dim

- Original Message -
From: Gene Ge [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 25, 2002 1:55 PM
Subject: [JBoss-user] Please help me! Transaction problem


 Someone please help me, I have asked this question many times and still
not
 get any answer yet! I also searched in archives but get no answer.


_
 11:43:14,093 ERROR [LogInterceptor] EJBException:
 javax.ejb.EJBException: Application Error: tried to enter Stateful bean
with
 different transaction context
 at

org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess
ionInstanceInterceptor.ja
 at

org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:107)
 at

org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:178)
 at
 org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
 at
 org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
 at

org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:
380)
 at

org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContai
nerInvoker.java:301)
 at

org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy
.java:41)
 at $Proxy270.setStudentData(Unknown Source)
 at

com.bit.job.actions.EditStudentInfoAction.execute(EditStudentInfoAction.java
:97)
 at

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:437)
 at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1115)
 at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:476)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
 at

org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:284)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
 at

org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:544)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
 at org.mortbay.http.HttpServer.service(HttpServer.java:875)
 at org.jboss.jetty.Jetty.service(Jetty.java:541)
 at
org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
 at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
 at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
 at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
 at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
 at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
 at java.lang.Thread.run(Thread.java:536)


_

 Who can tell me how to deal with this?
 If I retry to invoke the method for some times, the method could execute
 successfully.
 So??

 thanks for any help

 Gene

 _
 Get a speedy connection with MSN Broadband. Join now!
 http://resourcecenter.msn.com/access/plans/freeactivation.asp



 ---
 This sf.net email is sponsored by: Influence the future
 of Java(TM) technology. Join the Java Community
 Process(SM) (JCP(SM)) program now.
 http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Please help me! Transaction problem

2002-10-24 Thread Stephen Coy
From where does EditStudentInfoAction get its session bean reference?

Does it create a new one for each request, or does it create just one  
and try to re-use it for each request?

The latter situation is guaranteed to cause the problem below.

If that is not the cause, then show me your implementation of  
EditStudentInfoAction.execute.

Steve Coy

On Friday, October 25, 2002, at 01:55  PM, Gene Ge wrote:

Someone please help me, I have asked this question many times and  
still not get any answer yet! I also searched in archives but get no  
answer.
___ 
__
11:43:14,093 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Application Error: tried to enter Stateful  
bean with different transaction context
   at  
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(Statefu 
lSessionInstanceInterceptor.ja
   at  
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterc 
eptor.java:107)
   at  
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercepto 
rCMT.java:178)
   at  
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
   at  
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
   at  
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer. 
java:380)
   at  
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalC 
ontainerInvoker.java:301)
   at  
org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSession 
Proxy.java:41)
   at $Proxy270.setStudentData(Unknown Source)
   at  
com.bit.job.actions.EditStudentInfoAction.execute(EditStudentInfoAction 
.java:97)
   at  
org.apache.struts.action.RequestProcessor.processActionPerform(RequestP 
rocessor.java:437)
   at  
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java 
:264)
   at  
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1115)
   at  
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:476)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at  
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
   at  
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplication 
Handler.java:284)
   at  
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577 
)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
   at  
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCo 
ntext.java:544)
   at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
   at org.mortbay.http.HttpServer.service(HttpServer.java:875)
   at org.jboss.jetty.Jetty.service(Jetty.java:541)
   at  
org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
   at  
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
   at  
org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
   at  
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:20 
0)
   at  
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
   at  
org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
   at java.lang.Thread.run(Thread.java:536)
___ 
__

Who can tell me how to deal with this?
If I retry to invoke the method for some times, the method could  
execute successfully.
So??

thanks for any help

Gene



---
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Please help me ...

2001-10-24 Thread IvanLatysh


Hi All.

I have got one problem and I can't get the right way.

I have database and I wrap this database with EntityBeans.
But now I need build report and I need summary information (in SQL: select 
sum(myColumn) from
myTable group by myID)

I see any ways how to do it.
1. Build the new EntityBean which will execute SQL and will represent summary 
information (but I
see something wrong here)
2. Build a SessionStateless bean and execute SQL to get this summary information
3. Build SessionStateless bean to get data from my EntityBean-s and group this data 
manualy.

My question - how to have it done more easely and in right way.

Sincerely yours, Ivan Latysh.
[EMAIL PROTECTED]
http://ivan.yourmail.com


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Please help me ...

2001-10-24 Thread Fred Loney

Aggregate queries are usually best performed by a SLSB using an SQL
statement. One exception is if the query range is a small number of
records whose corresponding EBs can be readily activated by a finder,
e.g. a sum over a user's account balances where the account EBs are
fetched by a UserHome finder. The finder alternative is esp. appropriate
if the use case calls for a subsequent drill down into the detail EBs.
Moral: depends on the app usage model, as usual.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com

- Original Message -
From: IvanLatysh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 7:40 AM
Subject: [JBoss-user] Please help me ...



 Hi All.

 I have got one problem and I can't get the right way.

 I have database and I wrap this database with EntityBeans.
 But now I need build report and I need summary information (in SQL:
select sum(myColumn) from
 myTable group by myID)

 I see any ways how to do it.
 1. Build the new EntityBean which will execute SQL and will represent
summary information (but I
 see something wrong here)
 2. Build a SessionStateless bean and execute SQL to get this summary
information
 3. Build SessionStateless bean to get data from my EntityBean-s and
group this data manualy.

 My question - how to have it done more easely and in right way.

 Sincerely yours, Ivan Latysh.
 [EMAIL PROTECTED]
 http://ivan.yourmail.com


 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Please help me ...

2001-10-24 Thread John Moore
Title: RE: [JBoss-user] Please help me ...







or, 
#4) Rather than a new entity bean, use the existing entity bean and put a new method that grabs the datasource from jndi, gets a connection, runs the query and closes (hands back) the connection.

I have done #2  #4, more often #2.


#1 won't buy you anything except more beans to manage.
#3 is a waste of system resources


John


-Original Message-
From: IvanLatysh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 7:41 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Please help me ...




Hi All.


I have got one problem and I can't get the right way.


I have database and I wrap this database with EntityBeans.
But now I need build report and I need summary information (in SQL: select sum(myColumn) from
myTable group by myID)


I see any ways how to do it.
1. Build the new EntityBean which will execute SQL and will represent summary information (but I
see something wrong here)
2. Build a SessionStateless bean and execute SQL to get this summary information
3. Build SessionStateless bean to get data from my EntityBean-s and group this data manualy.


My question - how to have it done more easely and in right way.


Sincerely yours, Ivan Latysh.
[EMAIL PROTECTED]
http://ivan.yourmail.com



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





Re: [JBoss-user] Please help me ...

2001-10-24 Thread IvanLatysh

Hello, John!
You wrote to 'IvanLatysh' [EMAIL PROTECTED] [EMAIL PROTECTED] on 
Wed, 24
Oct 2001 08:46:42 -0700:


 JM or,  #4) Rather than a new entity bean, use the existing entity bean
 JM and put a new method that grabs the datasource from jndi, gets a
 JM connection, runs the query and closes (hands back) the connection.
This way sounds nice.
But how to return data from my method? Or just return a Vector?

 JM I have done #2  #4, more often #2.

 JM #1 won't buy you anything except more beans to manage.
 JM #3 is a waste of system resources

 JM I see any ways how to do it.
 JM 1. Build the new EntityBean which will execute SQL and will
 JM represent summary information (but I see something wrong here)
 JM 2. Build a SessionStateless bean and execute SQL to get this summary
 JM information
 JM 3. Build SessionStateless bean to get data from my EntityBean-s and
 JM group this data manualy.

 JM My question - how to have it done more easely and in right way.

---
Yours sincerely, Ivan Latysh.
[EMAIL PROTECTED]
http://ivan.yourmail.com


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Please help me ...

2001-10-24 Thread John Moore
Title: RE: [JBoss-user] Please help me ...






I agree with the Fred that the SLSB is the better route and cleaner overall. In any event, you are only going to return an int. So, in your remote interface add a public int getXYZ() ... and then add the same to the Bean. The following is from a SLSB but the same would work in a Entity Bean. Note: we put the name of our datasource into an env-entry rather than hard code; you wouldn't need to do this. 

John



Remote Interface
 public abstract int countByXYZ( int arg ) throws RemoteException, ... ;



Implementation Class
 public int countByXYZ( int arg) throws RemoteException, ... {
 DataSource ds = null;
 Connection con = null;
 PreparedStatement ps = null;
 ResultSet result = null;
 int count = 0;
 final String query = select count(0) from DUMMY_TBL where ARG_TO_MATCH = ? ;


 try {
 InitialContext context = new InitialContext();
 String dataSourceName = (String)context.lookup(java:comp/env/data_source_name);
 ds = (DataSource)context.lookup(java: + dataSourceName);
 con = ds.getConnection();
 con.setAutoCommit(false);
 ps = con.prepareStatement(query);
 ps.setInt( 1, arg );
 result = ps.executeQuery();
 if (result.next()) {
 count = result.getInt(1);
 }
 }
 catch( Exception e ) {
 throw new BusinessException( e );
 }
 finally {
 try { result.close(); } catch( Exception e ) { }
 try { ps.close(); } catch( Exception e ) { }
 try { con.close(); } catch( Exception e ) { }
 }
 return count;
 }


-Original Message-
From: IvanLatysh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 8:58 AM
To: John Moore; [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Please help me ...



Hello, John!
You wrote to 'IvanLatysh' [EMAIL PROTECTED] [EMAIL PROTECTED] on Wed, 24
Oct 2001 08:46:42 -0700:



JM or, #4) Rather than a new entity bean, use the existing entity bean
JM and put a new method that grabs the datasource from jndi, gets a
JM connection, runs the query and closes (hands back) the connection.
This way sounds nice.
But how to return data from my method? Or just return a Vector?


JM I have done #2  #4, more often #2.


JM #1 won't buy you anything except more beans to manage.
JM #3 is a waste of system resources


JM I see any ways how to do it.
JM 1. Build the new EntityBean which will execute SQL and will
JM represent summary information (but I see something wrong here)
JM 2. Build a SessionStateless bean and execute SQL to get this summary
JM information
JM 3. Build SessionStateless bean to get data from my EntityBean-s and
JM group this data manualy.


JM My question - how to have it done more easely and in right way.


---
Yours sincerely, Ivan Latysh.
[EMAIL PROTECTED]
http://ivan.yourmail.com





Re: [JBoss-user] Please help me ...

2001-10-24 Thread IvanLatysh

Hello, John!
You wrote to 'IvanLatysh' [EMAIL PROTECTED] [EMAIL PROTECTED] on 
Wed, 24
Oct 2001 09:14:00 -0700:


 JM Note: we put the name of our datasource into an env-entry rather
 JM than hard code; you wouldn't need to do this.
I have done the same way.

Now I see.
You mean to calculate sum for _each_ field separately?
Ok in sql it will be like:
Select sum(a), sum(b), sum(c) from myTable where id=1 group by myName

And now I should create 3 function and each function will calculate sum for separate 
field:
1 - Select sum(a) from myTable where id=1 group by myName
return sum

2 - Select sum(b) from myTable where id=1 group by myName
return sum

3 - Select sum(c) from myTable where id=1 group by myName
return sum

 ---
Yours sincerely, Ivan Latysh.
[EMAIL PROTECTED]
http://ivan.yourmail.com


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Please help me ...

2001-10-24 Thread Andrius Juozapaitis

RE: [JBoss-user] Please help me ...IMHO slsb + entity bean collection
approach looks like a better and more universal one. with jboss caching the
entities, you might not get a db hit at all. and if your data is more or
less static, there is a way to use read-only entity beans, look in the
archives for more info on this

regards,
--andrius


- Original Message -
From: John Moore

I agree with the Fred that the SLSB is the better route and cleaner overall.
In any event, you are only going to return an int.  So, in your remote
interface add a public int getXYZ() ... and then add the same to the Bean.
The following is from a SLSB but the same would work in a Entity Bean.
Note: we put the name of our datasource into an env-entry rather than hard
code; you wouldn't need to do this.
John




___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Please help me ...

2001-10-24 Thread John Moore
Title: RE: [JBoss-user] Please help me ...






Andrius,


Good point, then it comes down to what you are trying to get the sum of. I have tables w/ million+ active records, multiple containers, commit-option=B/C and our sums/counts are of big results so the collection route was a bad thing (for me). 

Even so I'm wondering, on smaller collections how would jboss know that it had all of the records that qualified for the query unless it was a result of a finder method for which the results were still cached? It seems like it would still have to go back to the DB and re-retrieve the keys to verify against the cache. 

john





-Original Message-
From: Andrius Juozapaitis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 10:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Please help me ...



RE: [JBoss-user] Please help me ...IMHO slsb + entity bean collection
approach looks like a better and more universal one. with jboss caching the
entities, you might not get a db hit at all. and if your data is more or
less static, there is a way to use read-only entity beans, look in the
archives for more info on this


regards,
--andrius



- Original Message -
From: John Moore


I agree with the Fred that the SLSB is the better route and cleaner overall.
In any event, you are only going to return an int. So, in your remote
interface add a public int getXYZ() ... and then add the same to the Bean.
The following is from a SLSB but the same would work in a Entity Bean.
Note: we put the name of our datasource into an env-entry rather than hard
code; you wouldn't need to do this.
John





___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





Re: [JBoss-user] Please help me ...

2001-10-24 Thread danch

Any time you call a finder there's at least one hit on the database, for 
that very reason. Even with commit option A, the container hits the 
database to get (at least) the keys.

-danch

John Moore wrote:

 
 Andrius,
 
 Good point, then it comes down to what you are trying to get the sum 
 of.   I have tables w/ million+ active records, multiple containers, 
 commit-option=B/C and our sums/counts are of big results so the 
 collection route was a bad thing (for me).  
 
 Even so I'm wondering, on smaller collections how would jboss know that 
 it had all of the records that qualified for the query unless it was a 
 result of a finder method for which the results were still cached?  It 
 seems like it would still have to go back to the DB and re-retrieve the 
 keys to verify against the cache.  
 
 john
 
 
 
 
 -Original Message-
 From: Andrius Juozapaitis [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 10:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Please help me ...
 
 
 RE: [JBoss-user] Please help me ...IMHO slsb + entity bean collection
 approach looks like a better and more universal one. with jboss caching the
 entities, you might not get a db hit at all. and if your data is more or
 less static, there is a way to use read-only entity beans, look in the
 archives for more info on this
 
 regards,
 --andrius
 
 
 - Original Message -
 From: John Moore
 
 I agree with the Fred that the SLSB is the better route and cleaner 
 overall.
 In any event, you are only going to return an int.  So, in your remote
 interface add a public int getXYZ() ... and then add the same to the Bean.
 The following is from a SLSB but the same would work in a Entity Bean.
 Note: we put the name of our datasource into an env-entry rather than 
 hard
 code; you wouldn't need to do this.
 John
 
 
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 



___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Please help me

2001-07-25 Thread riyaz ahamed

hi,
  I am new to JBoss, I installed it and then 
when I started JBoss, it's auto deployer
has given the following error for the very simple
bean and for the interest bean.

Please, can anybody help me.

Riyaz ahamed.


[Container factory]
javax.naming.CommunicationException.  Root exception
is java.rmi.StubNotFoundException: Remote object not
exported: org.jboss.proxy.ProxyProxy



__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user