[JBoss-user] [Persistence CMP/JBoss] - findAll method with more than 1000 records

2004-07-20 Thread chalupas
Hi All! 
My question is about design strategy.
I have an Entity Bean, which data I should show to the client in list. 
I have a finder on that Entity Bean (findAll in home interface).  When I have got a 
collection of entity beans from finder I create a collection of serializable Value 
Objects, which I return to client in session facade. The problem is the list is very 
large (more than 1000 record) and elapsed time is about 30-60 sec. and more. Client 
needs to see in list (for example) records from 1 to 50 or from 50 to 100 e.t.c and 
How can I limit row number in EJBQL, or I shuold use JDBC calls instead of EJBQL? How 
can I decrease time of method? Is it effective designed application when I use findAll 
method everytime when client needs to see a list?

Thanks


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3842676#3842676

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842676


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - JNDI Names for CMP Bean

2004-06-10 Thread chalupas
I have two .jar files which contains EntityBeans whith local interfaces.
In jboss.xml I use JNDI names, which corresponds to Bean names, for example:

jboss.xml for first .jar file
===


   ejb-nameBeanA/ejb-name
   local-jndi-nameBeanA/local-jndi-name

...
===

jboss.xml for second .jar file
===


   ejb-nameBeanB/ejb-name
   local-jndi-nameBeanB/local-jndi-name

...
===


But after deployment I see in jmx-conslole the names of my beans like this:

jndiName=BeanA,service=EJB 
jndiName=local/BeanB,service=EJB 

So, lookup for BeanB is failed.
What is the reason? Something wrong with descriptors?



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838295#3838295

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838295


---
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - EntityBeans whith local interfaces. JNDI Problem

2004-06-10 Thread chalupas
 have two .jar files which contains EntityBeans whith local interfaces. 
In jboss.xml I use JNDI names, which corresponds to Bean names, for example: 

jboss.xml for first .jar file 
=== 
 

ejb-nameBeanA/ejb-name 
local-jndi-nameBeanA/local-jndi-name 

... 
=== 

jboss.xml for second .jar file 
=== 
 

ejb-nameBeanB/ejb-name 
local-jndi-nameBeanB/local-jndi-name 

... 
=== 


But after deployment I see in jmx-conslole the names of my beans like this: 

jndiName=BeanA,service=EJB 
jndiName=local/BeanB,service=EJB 

So, lookup for BeanB is failed. 
What is the reason? Something wrong with descriptors? 



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838297#3838297

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838297


---
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Deploying .ear file on JBOSS-3.0.4 - Problem with DTD

2004-06-10 Thread chalupas
When I try to deploy .ear file on JBoss-3.0.4 server I have an ERROR with message 
org.jboss.deployment.DeploymentException: External entity not found: 
http://www.jboss.org/j2ee/dtd/jboss-app_3_0.dtd;.; - nested throwable: 
(java.net.ConnectException: Connection refused: connect). 
I use firewall for Internet connection, this is (probably) the reason of error. 
I have downloaded a file jboss-app_3_0.dtd. 

Where should I put it so that JBoss uses the local copy of DTD? 

P.S. Deployment of the same .ear in JBoss-3.2.3 is OK.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838298#3838298

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838298


---
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - Deploying .ear file on JBOSS-3.0.4 - Problem with DTD

2004-06-08 Thread chalupas
When I try to deploy .ear file on JBoss-3.0.4 server I have an ERROR with message 
org.jboss.deployment.DeploymentException: External entity not found: 
http://www.jboss.org/j2ee/dtd/jboss-app_3_0.dtd;.; - nested throwable: 
(java.net.ConnectException: Connection refused: connect).
I use firewall for Internet connection, this is (probably) the reason of error.
I have downloaded a file jboss-app_3_0.dtd. 

Where should I put it so that JBoss uses the local copy of DTD?

P.S. Deployment of the same .ear in JBoss-3.2.3 is OK.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3837974#3837974

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837974


---
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - InitialContext and Threads

2004-03-17 Thread chalupas
Can I use an instance of InitialContext in multithread environment, ie
is 
initialContext.lookup();
thead-safe?

a 
href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3826133#3826133;View 
the original post/a

a 
href=http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3826133Reply 
to the post/a


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - How to get Caller Principal in plain Java class

2004-02-29 Thread chalupas
I have a SessionFacade which calls a method in plain java class.
At Java class I need to write log with message that 
user A call this method.
 How can I do that if I don't want to pass a Principal object as method argument?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3823554#3823554

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3823554


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - Connect to other EJB server from Session Bean

2004-02-27 Thread chalupas
I use JBoss 3.2.3 and I need to connect to other EJB server (JBoss 3.0.4) as client. I 
try to make lookup 

java.util.Hashtable JNDIParm = new java.util.Hashtable();
JNDIParm.put(Context.PROVIDER_URL, Services.OTHER_SERVER_URL);
JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, 
org.jnp.interfaces.NamingContextFactory);
Context ctx = new InitialContext(JNDIParm);
Object ref = ctx.lookup(MySessionFacade);

At last line the following exception arises:

14:51:30,512 ERROR 
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:332): 
EJBException, causedBy:
javax.naming.CommunicationException [Root exception is java.rmi.ServerException: 
RemoteException occurred in server thread; nested exception is: 
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception 
is: 
java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no 
security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at 
ru.mgr.mls.facades.search.SearchSessionFacadeBean.findFileArchiveHome(SearchSessionFacadeBean.java:657)
at 
ru.mgr.mls.facades.search.SearchSessionFacadeBean.findFileContainerByDocId(SearchSessionFacadeBean.java:878)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is: 
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception 
is: 
java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no 
security manager: RMI class loader disabled)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at 

[JBoss-user] [Security JAAS/JBoss] - Re: Security, multi-user environment

2004-02-12 Thread chalupas
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821180#3821180

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821180

Thanks for your help. Situation becomes clear. 

But now I don't  understand where login procedures should be placed.

I use Tomcat/Jboss and restrict access to EJB by specifying security domain, 
configuring ejb-jar.xml etc...

My assumption is to put login procedures code to BusinessDelegate class and call it 
before each remote method invokes.

Is it right? What do you advise?




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - Re: Security, multi-user environment

2004-02-12 Thread chalupas
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821190#3821190

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821190

And last question. Imagine a following code fragment, which is used by client:



public class MyBusinessDelegate {

  MySessionFacadeHome facadeHome;

  MySessionFacade facade;

  String user_name;

  String user_pass;

  private void MyBusinessDelegate() {

 // All required actions for correct initialization facadeHome and facade  as 
described 

  } 

  public void login() {

// All required actions to login as described above discussion

 }

 

  public void method() {

  facade.method();

  }



}



In multi-user, multi-thread environment (servlet):

1) User A creates a new instance of MyBusinessDelegate class;

   MyBusinessDelegate InstA = new MyBusinessDelegate();

2) User B creates a new instance of MyBusinessDelegate class;

   MyBusinessDelegate InstB = new MyBusinessDelegate();

3) User A call login();

4) User B call login();

5) User A call method();

In step 5 User A call method() as user B.



Does it mean than login() and method() should be syncronized?

Any ideas?












---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security JAAS/JBoss] - Security, multi-user environment

2004-02-11 Thread chalupas
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821167#3821167

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821167

My question is similar to BrianZ. He wrote:

-

We are using SessionContext/EntityContext to get the user name for updating the db. 
The problem is the last user who logged in is always set for all others in a 
multi-user environment. Pojos were written in order to isolate the issue, but the 
problem did not occur. Any suggestions?

-

starksm anwered:

-

 don't understand what your asking with regard to getCallerPrincipal(). This is the 
identity of the caller on the current invocation. In a multi-user environment it can 
change on every call. What is the relationship between the caller of an ejb and the db?

-



I try to emulate multi-user environment  with a following code:



// User1 has admin privilegues

 AppCallbackHandler handler1 = new AppCallbackHandler(UserData.ADMIN_LOGIN, 
UserData.ADMIN_PASSWORD);

LoginContext lc1 = new LoginContext(other, handler1);

 lc1.login();

 Subject subj1 = lc1.getSubject();

 Context context1 = new InitialContext();

 Object ref1 = context1.lookup(MySessionFacade);

 MySessionFacadeHome facadeHome1 = (MySessionFacadeHome) 
PortableRemoteObject.narrow(ref1, MySessionFacadeHome.class);

 MySessionFacade facade1 = facadeHome1.create();

 facade1.method();



 // In server method() I put following line 

 // log.debug(Principal is  + this.sessionContext.getCallerPrincipal ().getName());

 // At this time it will output  Principal is admin



// User 2 has a guest privilgues

AppCallbackHandler handler2 = new AppCallbackHandler(UserData.GUEST_LOGIN, 
UserData.GUEST_PASSWORD);

LoginContext lc2 = new LoginContext(other, handler2);

lc2.login();

Subject subj2 = lc2.getSubject();

Context context2 = new InitialContext();

Object ref2 = context2.lookup(MySessionFacade);

MySessionFacadeHome facadeHome2 = (MySessionFacadeHome) 
PortableRemoteObject.narrow(ref2, MySessionFacadeHome.class);

MySessionFacade facade2 = facadeHome2.create();



facade2.method();

   // At this time it will output  Principal is guest



//



// Call facade1 again 

facade1.method();

   // At this time it will output  Principal is guest



What code should I put to line marked // for call facade1.method();

whith admin role? 

As I can see from starksm answer I must relogin before EACH method() call? 

Probably this situation taking place in servlets/jsp,  which lives in same JVM.


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user