[JBoss-user] [EJB 3.0] - Re: EJB3 WebServices

2006-06-07 Thread leonell
Nobody did test @WebService ???

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949700#3949700

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949700


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: EJB3 WebServices

2006-06-05 Thread leonell
When I tried to compile the webservice task from the tutorial I got the same 
error.


  | [javac] 
/usr/java/jboss-EJB-3.0_RC7-FD/docs/tutorial/webservice/src/org/jboss/tutorial/webservice/bean/Calculator.java:31:
 incompatible types
  | [javac] found   : javax.jws.WebService
  | [javac] required: java.lang.annotation.Annotation
  | [javac] @WebService
  | [javac]  ^
  | [javac] 
/usr/java/jboss-EJB-3.0_RC7-FD/docs/tutorial/webservice/src/org/jboss/tutorial/webservice/bean/Calculator.java:32:
 incompatible types
  | 

What is current state of webservices support in JBOSS EJB3 ??

Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949009#3949009

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949009


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: @Index and MySQL

2006-06-05 Thread leonell
"Salvatore.Gerace" wrote : 
  | I use the @Index annotation (org.hibernate.annotations.Index) for create 
index if I set in persistence.xml:
  | not work with:
  | property name="hibernate.hbm2ddl.auto" value="update"
  | This is a bug? Exists a solution?
  | 

I have the same experience with Postgresql. 
But there is other question:

Do you need it?

In real life you typically use more SQL commands for DB creations. 
You need optimize tablespaces, specify domains, and other, server related, 
settings.
Every SQL server has different setting - you cannot solve it in one EAR.

You can use SQL script for database creation and you (or SQL admin) will run it 
before deploy.  Or you can use small GUI application  where you will create 
database, modify settings and with full your control create structure of 
database.

And also note:
When you use 'org.hibernate.annotations.Index' annotation then your application 
will work with Jboss AS (Hibernate) only because this annotation is not part of 
EJB3 specification.

My mean.
Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949007#3949007

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949007


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: ejb3 and administration console

2006-06-03 Thread leonell
"adrienogee" wrote : 
  | The server didn't tell a word... and when I checked on the repertory, my 
file (CalculatorBean.jar) was there... 
  | 

When I deploy my EAR file with entity beans and session beans I get many 
records in server.log file.  Here is example: 


  | INFO  [org.jboss.deployment.EARDeployer] Init J2EE application: 
file:/var/jboss-4.0.4.GA/server/all/deploy/Banka.ear
  | INFO  [org.jboss.ejb3.Ejb3Deployment] EJB3 deployment time took: 15
  | INFO  [org.jboss.ejb3.Ejb3Deployment] EJB3 deployment time took: 16
  | INFO  [org.jboss.ejb3.JmxKernelAbstraction] installing MBean: 
persistence.units:ear=Banka.ear,unitName=banka_persistence_unit with 
dependencies:
  | INFO  [org.jboss.ejb3.JmxKernelAbstraction] 
jboss.jca:name=Banka_DS,service=ManagedConnectionFactory
  | INFO  [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo 
[ name: banka_persistence_unit   ...]
  | INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: 
cz.qds.banka.ebs.Prevod
  | INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: 
cz.qds.banka.ebs.Ucet
  | ...
  | INFO  [org.jboss.deployment.EARDeployer] Started J2EE application: 
file:/var/jboss-4.0.4.GA/server/all/deploy/Banka.ear
  | 

You have something wrong. 
You must create EAR with application.xml file in META-INF folder and as part of 
this EAR must be JAR with your EJB3 classes.

Leos

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948872#3948872

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3948872


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: EJB3 WebServices

2006-06-03 Thread leonell
One comment:
I tested it with "http://localhost:8080/Hello/HelloBean?wsdl"; because my ear 
name is "Hello.ear".
Result (=Error) is the same.

Leos

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948857#3948857

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3948857


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - EJB3 WebServices

2006-06-03 Thread leonell
Hi,
I created very simple application (hello.ear) with very simple WebService.

File application.xml (EAR descriptor):

  | 
  | http://java.sun.com/dtd/application_1_3.dtd";>
  | 
  |Hello Enterprise Archive
  |
  |   Hello-SBI.jar
  |
  |
  |   Hello-SBS.jar
  |
  | 
  | 

Interface file HelloRemote.java:

  | package cz.qds.hello.sbi;
  | import java.rmi.Remote;
  | import javax.jws.WebMethod;
  | import javax.jws.WebService;
  | @WebService()
  | //@SOAPBinding(style=Style.RPC)
  | public interface HelloRemote extends Remote
  | {
  |@WebMethod()
  |public String sayHello();
  | }
  | 
  | 

Note: there is one difference from Tutorial - I cannot compile it when 
@SOAPBinding(style=Style.RPC) is in code. Reason of this error ( 
"org/jboss/lang/Annotation.class not found" ) is in jbossws14.jar which 
contains SOAPBinding class (my mean). 
My compile time libraries are jboss-annotation-ejb3.jar, jboss-ejb3x.jar, 
jboss-ejb3.jar, ejb3-persistence.jar, hibernate3.jar, 
hibernate-entitymanager.jar and hibernate-annotations.jar 

Bean file HelloBean:

  | package cz.qds.hello.sbs;
  | import cz.qds.hello.sbi.*;
  | import javax.ejb.*;
  | import javax.jws.WebService;
  | import javax.persistence.*;
  | @Stateless
  | @WebService(endpointInterface="cz.qds.hello.sbi.HelloRemote")
  | public class HelloBean
  | {
  | public String sayHello() 
  | {
  | return "Hello!" ;
  | }
  | }
  | 

Fine. Compile succeed. Deploy succeed.

When I test it with "http://localhost:8080/Hello.ear/HelloBean?wsdl"; then I 
obtain error 404 with "The requested resource (/Hello.ear/HelloBean) is not 
available.".

JBOSS 4.0.4.GA with EJB3 RC7 installed.

Where is problem?
Does someone successfully use Jboss EJB3 WebServices?

Thank you very much,
Leos 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948856#3948856

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3948856


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - @Lob on postgresql does not save first byte

2006-05-06 Thread leonell
Hi,
I have the following experience:

I created entity bean with @Lob field:

  | // Binary based Large Object
  | @Lob @Basic(fetch = FetchType.EAGER)
  | public byte[] getPhoto() 
  | {
  | return photo;
  | }
  | public void setPhoto(byte[] photo) 
  | {
  | this.photo = photo;
  | }
  | 

Bug? in @Lob implementation or PostgresqlDialect
First byte of binary data are not saved.

  |  File file = new File("/home/lur/picture.jpg");
  |  b = new byte[ (int) file.length() ];
  |  FileInputStream fis = new FileInputStream(file);
  |  fis.read(b);
  |  fis.close();
  |  o.setPhoto(b);
  |  riStockItems.save(o);
  | 

And workaround (works fine):

  |  // Workaround - JBOSS/EJB3+PGSQL ignores first byte of array
  |  File file = new File("/home/lur/picture.jpg");
  |  b = new byte[ (int) file.length()+1 ]; // we need one more byte
  |  FileInputStream fis = new FileInputStream(file);
  |  fis.read(b,1,(int) file.length()); // we begin from second byte
  |  fis.close();
  |  o.setPhoto(b);
  |  riStockItems.save(o);
  | 

What other SQL servers (hibernate dialects)?

Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941667#3941667

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941667


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Bean (+mysql) doesn't get deployed

2006-05-03 Thread leonell
One comment only:
I stopped using hibernate.dialect in "persistence.xml" file and now can switch 
SQL server by changing of datasource only.

But be warned -  Mysql has two dialects (myISAM and Innodb) and Hibernate 
cannot determine what you can (or want) to use. 
Some time ago was here some more information about Mysql and Hibernate dialect.


  |  
  | 

Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940954#3940954

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940954


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: EJB3.0 Standalone client

2006-04-30 Thread leonell
"manishATjboss" wrote : thanks for the suggestion. I'm still not entirely clear:
  | 
  | My interface is:
  | 
  |   | @Remote
  |   | public interface Get {
  |   | public int get(int key);
  |   | }
  |   | 
  | 
  | My bean is:
  | @Stateless
  |   | public class GetBean implements Get {
  |   | 
  |   | public int get(int key) {
  |   | return 42+key;
  |   | }
  |   | 
  |   | }
  |   | 
  | 

Client ( "blablabla" is name of your target EAR ):
public class Getter {
  | private Get getter;
  | 
  | public Getter()
  | {
  |   try
  |   {
  | Context ctx = new InitialContext();  // used parameters 
from jndi.properties
  | getter = (Get) ctx.lookup("blablabla/GetBean/remote");
  | System.out.println("got: " + getter.get(0));
  |}
  |catch (NamingException e)
  |{
  | System.err.println(""+e);
  | System.exit(0);
  |}
  | }
  | 
  |  public static void main(String[] args) 
  |  {
  |new Getter();
  |  }
  | }
  | 

And jndi.properties:

  | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
  | java.naming.provider.url=localhost
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940397#3940397

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940397


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Long transaction and transaction timeout

2006-04-29 Thread leonell
Hello,
I have the following stateless session bean:

  | @Stateless
  | public class UtilityBean implements UtilityRemote 
  | {
  | @PersistenceContext(unitName="performance_persistence_unit") 
  | EntityManager manager;
  | 
  | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  | private void deleteStockItems()
  | {
  | System.out.println("Start deleting StockItems");
  | Query qStockItem = manager.createQuery("delete from StockItem");
  | int retValue = qStockItem.executeUpdate();
  | System.out.println("Deleted "+retValue+" rows.");
  | System.out.println("End deleting StockItems");
  | }
  | 
  |.., here are similar methods for other entities ...
  | 
  | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  | public void deleteAllData() 
  | {
  | System.out.println("Start deleting all data in database");
  | deleteStockItems();
  | deleteOrderItems();
  | deleteOrders();
  | deleteCompanies();
  | deleteCountries();
  | System.out.println("End deleting all data in database");
  | }
  | 
  | @Remove
  | public void free() 
  | {
  | }
  | 

When I invoke deleteAllData() method from client, I get after 5 minutes warning 
(only part):
WARN  [org.jboss.tm.TransactionImpl] Transaction timed out. status=STATUS_ACTIVE

And when method ends then I obtain exception (only part):
ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active

Solution - change in jboss-service.xml file section of 
"TransactionManagerService" the value of   "TransactionTimeout"  from 300 to 
1200.
It means prolong timeout from 5 minutes to 20 minutes.

Is this correct way? Does exist other solution (for example manually set 
timeout per sessionbean  / method) ?

Thank you very much,
Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940355#3940355

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940355


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: How to add (non-referential, performance) index?

2006-04-18 Thread leonell
I will use Hibernate annotation @Index. 
But why is @Index ignored when hibernate.hbm2ddl.auto type is set to "update"?
Bug or feature? 

I also do not understand why does not exist similar annotation in official EJB3 
standard
because I dont know any real database with no additional indexes.


Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937946#3937946

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937946


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - How to add (non-referential, performance) index?

2006-04-18 Thread leonell
Hello,
I need to add index for better performance (non-referential index). 
I found one way:  using org.hibernate.annotation.Index.

It works fine but:
1) this is Hibernate only solution. Does exist some EJB3 annotation?
2) with Hibernate annotation is index correctly created when "create-drop" type 
is used but not with "update" type.

EJB3-RC6 with JBOSS 4.0.4-CR2

Do you have some ideas?
Leonell

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937853#3937853

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937853


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: setting fetch depth

2006-04-04 Thread leonell
Property "hibernate.max_fetch_depth" ? 
I tried different setting but no changes.

persistence.xml :
 

  | 
  | 
  | 
  | java:/Demo2006-ds
  | 
  |   
  | 
  | 
  | 
  | 
  | 
  | 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934791#3934791

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934791


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user