[jboss-user] [EJB 3.0] - Re: @GeneratedValue(strategy=GenerationType.AUTO) for oracle

2008-07-15 Thread oskar.carlstedt
Hi!

I haven not read all posts but I know the following works with Oracle.

1. Annotate your entity with @Entity as normal.

2. Annotate your ID column with @Id. 
@GeneratedValue(strategy=GenerattionType.AUTO, generator="seqMyObject"), 
@SequenceGenerator(name="seqMyObject", sequenceMame="SEQ_MY_OBJECT")


  | 
  | @Entity
  | public class MyObject {
  | 
  |@Id
  |@GeneratedValue(strategy=GenerationType.AUTO, generator="seqMyObject")
  |@SequenceGenerator(name="seqMyObject", sequenceName="SEQ_MY_OBJECT")
  |private Long id;
  | 
  |...
  | 
  | }
  | 
  | 

This shall work. As previous posts said it shall also be possible to put the 
sequenceGenerator annotation in the class but in my point of view it looks 
better to put it on the id property.



Cheers,
Oskar
 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164503
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Upgrading to 4.2.2 changed published WSDL

2008-04-14 Thread oskar.carlstedt
Hello!

Sorry to say, but this may be a hard working lesson to never go for the "code 
first" approach when creating web services which contracts shall be persistent 
over time and over different application servers. So a tip for future 
development, write your wsdl and included schemas by hand and then generate 
code from that (that's what we call "contract first").

Ok, now the good thing. You can always save your old published wsdl file and 
generate code from that. It will work for you.


Kind regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144123
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to start a session bean as soon as it is deployed

2008-04-01 Thread oskar.carlstedt
Here is a short eaxample:


  | @Service
  | @Management(MyServiceManagement.class)
  | @Depends("jboss.ws:service=DeployerInterceptorEJB3")
  | public class MyService implements MyServiceManagement {
  | 
  |private Timer timer = null;
  | 
  |@Resource
  |private EJBContext ejbContext;
  | 
  |public void start() throws Exception {
  |   timer = ejbContext.getTimerService().createTimer(1000, "Say Hello!!");
  |}
  | 
  |@Timeout
  |public void timeout(Timer timer) {
  |   System.out.println(timer.getInfo());
  |   timer = ejbContext.getTimerService().createTimer(1000, "Say Hello 
again!!");
  |}
  | 
  |public void stop() {
  |   timer.cancel();
  |}
  | }
  | 
  | 
  | public interface MyServiceManagement {
  | 
  | public void start() throws Exception;
  | 
  | public void stop() throws Exception;
  | }
  | 
  | 
  | 


/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140503
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to start a session bean as soon as it is deployed

2008-04-01 Thread oskar.carlstedt
Hi!

When annotating with the service you have four life cycle methods that you can 
implement.

*create
*start
*stop
*destroy

Try call test from start and you'll se that it will be called.

Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140493
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Create timer -

2008-03-27 Thread oskar.carlstedt
Ooopss... Then we are in trouble...

Is it possible to configure MySQL and Hypersonic with a XA data sources. What 
we want to do is to use the default data source as the timer data source and 
then use JPA with an underlying MySQL (with MyISAM tables) and get this to 
work. A config example would be great.

Thanks a lot for your help!
Kind Regards

/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139514
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Create timer -

2008-03-27 Thread oskar.carlstedt
I'm using JBoss 4.2.2.GA. Do I still have to use the JBoss specific annotation 
@IgnoreDependency or is it possible to do this in a pure standard java ee way?

Kind regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139503
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Create timer -

2008-03-27 Thread oskar.carlstedt
Hmm... and now you're back where you started, aren't you?

This is a pretty annoying problem. Is there a working example of doing this 
within an EJB? Is the following solution possible?


  | @Stateless
  | @Local
  | public class A {
  | 
  |@EJB
  |B b;
  | 
  |/**
  |* this method is the one that is invoked by the 'user'
  |**/
  |public void someBusinessMethodThatHasToCreateATimer(...) {
  |   ...
  |   b.startTimer();
  |}
  | 
  | 
  |/**
  |* this method will do the timeout job
  |**/
  |public void handleTimeout(Timer timer) {
  |   ...
  |}
  | 
  | }
  | 
  | 
  | /**
  | * this is a wrapper class to get a new transaction that only has to
  | * deal with one data source in its own transaction.
  | **/
  | @Stateless
  | @Local
  | public class B {
  | 
  |@Resource
  |EJBContext ejbContext;
  | 
  |@EJB
  |A a;
  | 
  |/**
  |* this method is invoked by A. the result shall be
  |* a created and persisted timer.
  |**/
  |public void startTimer() {
  |   ejbContext.getTimerService().createTimer(...);
  |}
  | 
  |/**
  |* handles the timeout and will not do anything more
  |* than just call the handleTimeout in A.
  |**/
  |@Timeout
  |public void timeout(Timer timer) {
  |   a.handleTimeout(timer);
  |}
  | 
  | }
  | 
  | 

This is not a nice solution using a circular reference, but is there any other 
way get around this problem without reconfiguring JBoss?


Cheers
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139492
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: jdk 1.6, jbossws 2.0.1 and jboss as 4.2.2.ga

2008-02-28 Thread oskar.carlstedt
Hi All!

Downgrade your JVM and your problem shall be gone. It has to do with the 
SOAP-implementation (SAAJ). I think you can switch SAAJ-implementation by 
adding a newer saajImpl.jar file to the $JBOSS_HOME/lib/endorsed directory. I'm 
not sure about the last part about SAAJ but it is a known problem using JBoss 
4.2.x with Java 6.

Dheers
/Oskar

 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132901
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: out parameter

2008-02-26 Thread oskar.carlstedt
Hi again!

Now I look at all these parts on a communication level. There might be a 
feature in JAXB to do all this state synchronization without your/my knowledge. 
I don't know. But the concept of web services does not support this kind of 
void feature where you change a value in your method "argument" - because there 
is no method or argument just an operation that accepts a message.

This is something you already know, but we take it from the beginning if there 
are other persons whoe are unsure about the concept of web services.

Web services, in this case SOAP, provide a stateless way to communicate with 
other components. You never know if these components are written in Java, .NET, 
Perl, C++ or whatever else. This is the whole point by using web services - You 
send a request message to a component and you get a response message in return.

Web services also use http as communication protocol. Http is a so called dead 
protocol, i.e. one request and then one response before the communication dies 
(we have something call keep alive to speed up things but that is just a way to 
keep the socket connection open).

To summarize, we have two stateless parts communicating with each other - or 
more correct one part (the client) asking the server for something by providing 
a message. The response is another message. The two parts don't know anything 
about each other more than what is exposed by the service contract (the WSDL 
file).

The question is, how can we provide the client with a new state on the server. 
Can it be exposed to the client in another way than by using a return 
statement? I don't think so.

Maybe JAXB can solve a void method by automatically map the contents of your 
request Java-object instance to the same instance as the response Java-object.


Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132389
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: out parameter

2008-02-21 Thread oskar.carlstedt
Hi!

In such cases you have to return the new "state" to the client in form av a 
returned object. So you cannot have this method as a void method.

Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Specifying the server's URL in the client?

2008-02-13 Thread oskar.carlstedt
Sorry!

Didn't get it all. I think this thread would give you answers about how to do 
handle attachments in the way you want.

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=124280

/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129309
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Specifying the server's URL in the client?

2008-02-13 Thread oskar.carlstedt
Hi!

Attachments are a tricky part. The simplest way to do is to add your attachment 
as a base64binary in your schema, but that is not what you always want to do. 
I've been asking a lot about how to use MTOM on a SOAPMessage, but I didn't get 
any response at all.

To answer your question about how to add attachments to a SOAPMessage.  You 
have to add an AttachmentPart to your SOAPMessage. The JavaDoc describes this 
part pretty well. take a look at 
http://java.sun.com/javase/6/docs/api/javax/xml/soap/AttachmentPart.html.

Hope it helps!
Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129308
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Specifying the server's URL in the client?

2008-02-12 Thread oskar.carlstedt
Hi!

You can always set the url in the service object when adding the port, like the 
following:


  | Service service = Service.create(new QName("...", "..."));
  | service.addPort(new QName("...", "..."), SOAPBinding.SOAP11HTTP_BINDING, 
"http://service.location/at/some/context";);
  | dispatch = service.createDispatch(new QName(...","..."), SOAPMessage.class, 
Service.Mode.MESSAGE);
  | 

Cheers
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128649
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - MTOM using javax.xml.ws.Provider?

2008-02-06 Thread oskar.carlstedt
Hello!

Is it possible to implement MTOM when using the javax.xml.ws.Provider< 
SOAPMessage >? Does any of you have a simple example.

Best regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127174
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: SOAPElement as input param

2008-02-06 Thread oskar.carlstedt
Hi!

Just use a javax.xml.ws.Provider< SOAPElement > provider. You create a class 
that implements the Provider interface. You'll get something like:


  | @Local
  | @Stateless
  | @WebServiceProvider(
  | serviceName = "...",
  | portName = "...",
  | targetNamespace = "...",
  | wsdlLocation = "META-INF/wsdl/...")
  | @ServiceMode(value = Service.Mode.PAYLOAD)
  | public class MyServiceBean implements Provider {
  | 
  | public SOAPElement invoke(SOAPElement requestSOAPElement) {
  | 
  | ...
  | 
  | }
  | 
  | }
  | 


You can read more about this in the JBossWS documentation. Pay attention to the 
ServiceMode.PAYLOAD. If you change this to ServiceMode.MESSAGE you can retrieve 
the whole soap message.

You can only implement the javax.xml.ws.Provider with the types SOAPElement, 
SOAPMessage and Source (e.g. StreamSource, DOMSource, ...).

Cheers
/Oskar




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127172
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Detect client disconnection

2008-02-03 Thread oskar.carlstedt
Hello!

Unfortunately there are no safe functions in javascript to detect when the 
browser window is closed. For me it sounds better to grab the output stream 
from the response and check it in a separate thread while the session bean is 
executing. I think you can write an empty/blank character to the stream.

Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125898
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: reading a local properties file

2008-02-03 Thread oskar.carlstedt
Hello!

This is the way to go. Never add a properties-file in the WEB-INF folder. A 
better place is on the classpath, i.e. in the WEB-INF/classes directory. Then 
you can access this file with the following command:


  | 
Thread.currentThread().getContextClassloader().getResourceAsStream("filename.extension");
  | 


Cheers
/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125895
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to start a session bean as soon as it is deployed

2008-02-03 Thread oskar.carlstedt
Hi All!

Important to know. An ejb is NOT started just because it is deployed. It is 
just available to a "client" through the application server. There is no method 
invoked on an ejb during or just after the deploy.

Ok, there are ways to go around this. Add a service to your ejb that is 
invoking your ejb. Use the @Service-annotation and then you get methods like 
start(), stop() create() and destroy().

Kind regards!
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125893
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Sequence Generator Question

2008-01-28 Thread oskar.carlstedt
Hi Kasim!

Sequenzes are not hibernate specific "stuff". Instead sequences are database 
specific counters. Oracle are using sequnces, but MsSQL, MySQL, etc. are using 
identity mappings. If you are using MySQL you probably use an auto_increment to 
get the same feature as an Oracle sequence.

Setting the strategy attribute (of the GeneratedValue-annotation) to AUTO will 
let Hibernate choose the strategy depending on the underlying database. I.e. 
Oracle will use sequence, MySQL will use identity.

This is what you shall do to be sure you write an implementation that works for 
many database providers/brands.


  | 
  | ...
  | 
  | @Entity
  | @Table(name="the_object")
  | public class TheObject {
  | 
  |...
  | 
  |@Id
  |@Column(name="id")
  |@GeneratedValue(strategy=GenerationType.AUTO,  generator="seqTheObject")
  |@SequenceGenerator(name="seqTheObject", sequenceName="SEQ_THE_OBJECT")
  |private Long id;
  | 
  |...
  | 
  | }
  | 

In this case, if you choose to use Oracle that is using sequnces, then you must 
have created a sequence SEQ_THE_OBJECT declared in your Oracle database schema. 
You get a create table syntax like:


  | CREATE TABLE THE_OBJECT (
  |ID NUMBER(10) NOT NULL,
  |...
  |PRIMARY KEY(ID)
  | );
  | 
  | CREATE SEQUENCE SEQ_THE_OBJECT START WITH 1 INCREMENT BY 1;
  | 
  | 

On the other hand, if you choose MySQL as your database provider, then you set 
the id column to use "AUTO_INCREMENT".



  | CREATE TABLE THE_OBJECT (
  |ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  |...
  |PRIMARY KEY(ID)
  | )
  | 


I hope this answered your question.

Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124271
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security & JAAS/JBoss] - How to design multi language SOA security?

2008-01-07 Thread oskar.carlstedt
Hello all!!

I'm writing this into the JBoss security forum because I can't find any better 
place to put it. I hope I will get some good answers or at least good advices 
of how to implement a security model in a multi language SOA environment.

I have an environment where we have some Perl models running in an Apache 
(httpd). We have some Java web services, some Perl web services, some other 
external applications. So it's just an pretty normal environment.

My problem is to define and implement a security model in the environment. I 
want to secure data on user/group level, but I also want to restrict access to 
web service operations and Perl functions per user/group level.

Do you know how to do this, some articles about where to start?

Best regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117536
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: maven2 - help to resolve javax.ws

2007-12-11 Thread oskar.carlstedt
Hello!

Many of the javax... files (read jars, taglibs, ...) are under license of Sun 
Microsystems Inc. Therefore they are not part of the global maven repository. 
Make a mvn deploy:deploy-file (or install:install-file) to add the jars you 
want to your own repository.

Cheers
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112148
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Dynamic no. of attachments using MTOM

2007-11-28 Thread oskar.carlstedt
Hi!

Thanks a lot!

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108428
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Dynamic no. of attachments using MTOM

2007-11-23 Thread oskar.carlstedt
Hi again!

Is this as simple as just creating JAX-B objects having normal annotations and 
then let one of the child objects take a DataHandler as argument?

One more question. Where do all the attachments go if I use the Provider< 
SOAPMessage > implementation?

Regards
/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107253
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Dynamic no. of attachments using MTOM

2007-11-22 Thread oskar.carlstedt
Ok!

What I mean is when I have a DataHandler I can get an input stream to the reach 
the attachment data. But what if I have the following xml. How do I get my xml 
document:


  | 
  |
  |   
  |  
  |  SOME TEXTUAL INFO 1 
  |  SOME TEXTUAL INFO 2 
  |  
  |  this part will go as MTOM attachment
  |   
  |   
  |  
  |  SOME TEXTUAL INFO 1 
  |  SOME TEXTUAL INFO 2 
  |  
  |  this part will go as MTOM attachment
  |   
  |
  | 
  | 

Are there two methods that are invoked in the implementing code. As I 
understand the DataHandler will give me the InputStream to the attachment 
(binary in above xml). But there is no way to get the rest of the xml, or is it?

Regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107125
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Dynamic no. of attachments using MTOM

2007-11-22 Thread oskar.carlstedt
Hi! Thanks for a quick reply!

Ok! It might be a good one to do so. When using a DataHandler list , where do I 
get the rest of my xml document. If using document/literal I will post/receive 
an xml document that may contain other textual information. In other words, my 
xml may contain some "normal" xml information and some binary information.

Regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107069
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Dynamic no. of attachments using MTOM

2007-11-22 Thread oskar.carlstedt
Hi!

Has anyone made i possible to implement a web service that can receive or send 
multiple attachments using MTOM. All examples just have one DataHandler but 
this is not enough for what I want to do. I want to be able to use a dynamic 
number of attachments.

XOP has support for several attachments in the xml document but how does JBoss 
and especially Java EE treat such a data structure. Where can I find my 
attachments?

If I use the Provider< SOAPMessage > mechanism I have full control, but still 
the question: Where can I find the send attachments? Do I have to use a 
Provider< Source > implementation to solve this?

My web service consumers want to send multiple documents to our server in one 
request. Upon other requests, I will generate a dynamic number of PDF documents 
on the server and then send them to the client. Is it possible? Of course we 
can bundle all attachments into a zip file and get one attachment - but this is 
an ugly work around.

I hope someone can answer this question.

Regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106990
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Deployed service statistics

2007-10-23 Thread oskar.carlstedt
Hi!

http://repository.jboss.org/maven2/jboss/jbossws-spi/1.0.0.GA/jbossws-spi-1.0.0.GA.jar

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097904
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: JBoss and Apache Axis compatibility

2007-10-22 Thread oskar.carlstedt
Hi!

If you are creating "contract first" web services, there should be no problem 
at all. If you are generating your contract you can get into trouble.

So stick to contract first and generate booth service implementation and client 
usage from the contract to be on the "safe" side.

Regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097706
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Deployed service statistics

2007-10-22 Thread oskar.carlstedt
Hi!

Just take a look in the source code for the jbossws web application and you´re 
up and running. It's really simple when you find the correct source.

Anyway, here is a code snippet ...

  | // get SPI provider and endpoint registry
  | SPIProvider spiProvider = SPIProviderResolver.getInstance()
  | .getProvider();
  | EndpointRegistry epRegistry = spiProvider.getSPI(
  | EndpointRegistryFactory.class).getEndpointRegistry();
  | 
  | // loop over all endpoints
  | Set objectNames = epRegistry.getEndpoints();
  | for (ObjectName objectName : objectNames) {
  | 
  | // get the endpoint by using its name
  | Endpoint endpoint = epRegistry.getEndpoint(objectName);
  | 
  | ... 
  | }
  | 


Cheers,
Oskar


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

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

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: JBOSS Webservice & Thai Language

2007-10-18 Thread oskar.carlstedt
Hi!

You have to set the encoding to UTF-8 (default is ISO-8859). I'm not sure if 
there is any other way right now than setting the file.encoding parameter to 
UTF-8. So add -Dfile.encoding=UTF-8 to your JAVA_OPTS when starting JBoss.

Good luck!
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096568
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Multithreading in Jboss 4.0.1

2007-10-17 Thread oskar.carlstedt
Hi!

The most correct way to do this is to write your own MBean/Service. AFAIK 
threads are not allowed inside an EJB (some application servers will allow 
threads in the EJB). So writing your own MBean that will take care of 
multithreading might solve your problem.

Creating MBeans is about adding a new service entry in you jboss-app.xml that 
will point out a your-service.xml file.

You MBean javacode must implement an interface s.a. YourServiceMBean (Notice 
the pattern interface name ends with MBean, the implementation does not);
mbean interface: YourServiceMBean
mbean impleementation: YourService

You are looking up MBeans in the same way as you do with an EJB with the 
iniCtx.lookup(...)

The MBean has some life cycle methods that you might want to use:
start(), stop(), ... Start is called when the service is deployed. Check the 
JBoss application server documentation for more details.


Hope this can help you.
Cheers
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096383
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to connect multiple databases at same time?

2007-10-11 Thread oskar.carlstedt
Hello!

AFAIK the whole idea with JPA is to have one data source per ejb-jar-file (but 
I might have misunderstood everything). If you need to persist data into 
several schemas you have to create a "super/delegating" ejb that will lookup 
the correct ejb to use for persistence.

So, you have to make your business logic in one ejb, then a lookup on a (local 
SLSB) ejb to actually use when persisting your data.


Kind regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094363
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: wsdl based web-service (like a paypal simulator)?

2007-10-09 Thread oskar.carlstedt
Hello!

As I said before, this is probably due to the circular schema imports. JBoss 
will try to load the first schema (CoreComponentTypes.xsd). While scanning this 
schema JBoss will find the schema import for the 2:nd schema 
(eBLBaseComponents.xsd). While scanning this 2:nd schema JBoss will find the 
import of the 1:st schema (CoreComponentTypes.xsd) and so on. This circular 
schema scan will continue until you get out of memory. I can't find any other 
reason for this out of memory error.

If you don't understand, just follow the xml schema import statements in both 
schemas and you'll understand what I'm saying.

Best regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093208
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: wsdl based web-service (like a paypal simulator)?

2007-10-08 Thread oskar.carlstedt
Hi!

The WSDL file imports two XML-schemas that create a circular reference. A good 
point would be to ask them to change their design. The wsdl file at 
https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl imports two xml-schemas:

  | 
  | 
  | 

The CoreComponentTypes.xsd contains an import of eBLBaseComponents.xsd

  | 
  | 

and the eBLBaseComponents.xsd contains an import of CoreComponentTypes.xsd

  | 
  | 


And all this makes a circular reference between the two schema imports. Maybe 
one can file this as an extra feature/bug in JBoss. It shall not hang and it 
could be a good if JBoss was controlling if a schema already has been imported 
during the scan for schema imports.
 

Hope this helps!
Kind regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092851
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Transaction Not Allowed

2007-10-03 Thread oskar.carlstedt
Sorry, the links got messed up. Here they are again:

Java EE Tutorial: http://java.sun.com/javaee/5/docs/tutorial/doc/
Java EE JavaDoc: 
http://java.sun.com/javaee/5/docs/api/javax/ejb/TransactionManagement.html

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091342
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Transaction Not Allowed

2007-10-03 Thread oskar.carlstedt
Hello!

Do I understand You right if I say that Spring is starting its own 
transactions. If so, then you must use BMT (Bean Managed Transaction) and not 
CMT (Container Managed Transactions). CMT is used per default if you don't give 
any transaction attribute at all. Check out the Java EE tutorial chapter on 
transactions to learn more 
http://java.sun.com/javaee/5/docs/tutorial/doc/[/url]. Also check the JavaEE 
JavaDoc for more info 
[url]http://java.sun.com/javaee/5/docs/api/javax/ejb/TransactionManagement.html 
.

Kind regards
/Oskar
 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091341
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Raw Style webservices

2007-10-03 Thread oskar.carlstedt
Hmmm

I think I had this problem a long time ago. As I can remember it is the 
Document type that gives you the problem. Try adding an element instead of a 
document. I think the xml parser will complain about adding a document node to 
an existing document which is not allowed. Try adding element instead and your 
code shall work.

Cheers,
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091241
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: wsdl based web-service (like a paypal simulator)?

2007-10-03 Thread oskar.carlstedt
Hi!

I'm not sure if you are doing this, but I have had som troubles with JBossWS 
and nested schema imports. I tried to have relative urls between schemas using 
.. syntax for traversal of parent directory. JBossWS failed when doing this and 
told me to use something like getParent() instead of .. So now I put all my xsd 
files in the same folder under META-INF and now everything is working fine.

Here is an example using the provider interface. This is almost the same as 
your implementation but you are using the @WebService annotation.

@Local
  | @Stateless
  | @WebServiceProvider(
  | serviceName = "ServiceTest",
  | portName = "ServiceTestSoap11Port",
  | targetNamespace = "http://service.mydomain.com/service-test";,
  | wsdlLocation = "META-INF/wsdl/service-test.wsdl")
  | @ServiceMode(value = Service.Mode.MESSAGE)
  | public class ServiceRegistrySEPBean implements Provider {
  | public SOAPMessage invoke(SOAPMessage requestSoapMessage) {
  | ...
  | }
  | }
  | 

/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091239
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Encoding problem

2007-10-03 Thread oskar.carlstedt
Hello!

You can start JBoss with the file.encoding parameter

  | -Dfile.encoding=UTF-8
  | 

Be careful when doing this because you will treat all files as UTF-8-encoded if 
nothing else is given. OK, I haven't had any problems doing this on all our 
servers, but it is worth an extra note.


Regards,
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091235
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: wsdl based web-service (like a paypal simulator)?

2007-10-03 Thread oskar.carlstedt
Hello!

Take a look at the samples in the JBossWS distribution. I'm using contract 
first based web services with jboss that are working fine. Are your xml schemas 
valid? Do they point to a url that is inaccessible? Such things can cause JBoss 
to hang until it gets a timeout.


Best
/Oskar




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090901
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Installation fails on JBOSS 4.0.4.

2007-10-02 Thread oskar.carlstedt
JBossWS 1.2.1.GA and above are made for JBoss 4.0.5.GA and above.

anonymous wrote : Currently, we have integration layers for the JBossAS-5.0, 
JBossAS-4.2, JBossAS-4.0.5 and above.

See http://jbws.dyndns.org/mediawiki/index.php?title=Install_JBossWS for more 
information about this.

Regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090810
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can't load @Service in JBoss 4.2.1

2007-09-28 Thread oskar.carlstedt
It fixed the problem. I had bundled the jboss-annotations-3.0.jar file to my 
ear file (didn't set the scope of the above jar to provided in my maven 
project). So my mistake. Removing that jar file from the ear solved my problem.

Thanks for all help!
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089879
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: SOAPMessage error: setProperty must be overridden by all

2007-09-28 Thread oskar.carlstedt
Hi!

Everything I know is that the javax.xml.soap... implementations are found in 
the $JRE_HOME/lib/rt.jar ($JDK_HOME/jre/lib/rt.jar). If you want to override 
these implementation then you must place the correct jar files in the endorsed 
folder. You can read more about the Java Endorsed Override Mechanism here 
http://java.sun.com/javase/6/docs/technotes/guides/standards/.

Make sure the system property java.endorsed.dirs property is set. I think JBoss 
does this by default by adding the folder $JBOSS_HOME/lib/endorsed. So adding 
the correct jar files to this folder may fix your problem. If that doesn't 
work, I really don't know.

Best
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089873
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: SOAPMessage error: setProperty must be overridden by all

2007-09-28 Thread oskar.carlstedt
Hi!

This is probably because you are running JBoss with Java SE 1.6. The SOAP 
implementation is bundled in the std Java 1.6 distribution. That is probably 
why you can't find the specified jar on your harddrive.

Cheers,
Oskar

 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089849
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How do I invoke a method just after an ear-deploy?

2007-09-28 Thread oskar.carlstedt
I started a new thread for this last question. Please see 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089721#4089721

Best Regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089732
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Can't load @Service in JBoss 4.2.1

2007-09-28 Thread oskar.carlstedt
Hello!

I asked this question in an earlier thread 
(http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119784), but it is 
another topic so a new thread i better. So, the problem is when I deploy a 
simple POJO annotated @Service inside an ear-file.

My implementation is as follows:
ServiceReg.java

  | @Service(objectName = "test:service=TEST")
  | @Depends("jboss.ws:service=DeployerInterceptorEJB3")
  | @Management(ServiceRegManagement.class)
  | public class ServiceReg implements ServiceRegManagement {
  | 
  | private String simpleProperty = null;
  | 
  | public String getSimpleProperty() {
  | return simpleProperty;
  | }
  | 
  | public void setSimpleProperty(String simpleProperty) {
  | this.simpleProperty = simpleProperty;
  | }
  | 
  | // Lifecycle methods
  | public void create() throws Exception {
  | System.out
  | .println(">> 
RegService - Creating");
  | }
  | 
  | public void start() throws Exception {
  | System.out
  | .println(">> 
RegService - Starting");
  | }
  | 
  | public void stop() {
  | System.out
  | .println(">> 
RegService - Stopping");
  | }
  | 
  | public void destroy() {
  | System.out
  | .println(">> 
RegService - Destroying");
  | }
  | 
  | }
  |  

ServiceRegManagement.java

  | public interface ServiceRegManagement {
  | 
  | 
  | public String getSimpleProperty();
  | 
  | public void setSimpleProperty(String simpleProperty);
  | 
  | 
  | // Lifecycle methods
  | void create() throws Exception;
  | 
  | void start() throws Exception;
  | 
  | void stop();
  | 
  | void destroy();
  | 
  | }
  | 

When deploying these classes inside an ear file I get the following error from 
JBoss.

  | 11:16:25,931 INFO  [EJBContainer] STARTED EJB: 
se.my.service.test.soapmessage.ServiceReg ejbName: Se
  | rviceReg
  | 11:16:25,944 ERROR [STDERR] java.lang.RuntimeException: Problem registering 
@Management interface fo
  | r @Service class se.my.service.test.soapmessage.ServiceReg
  | 11:16:25,946 ERROR [STDERR] at 
org.jboss.ejb3.service.ServiceContainer.registerManagementInterfa
  | ce(ServiceContainer.java:560)
  | 11:16:25,948 ERROR [STDERR] at 
org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.ja
  | va:155)
  | 11:16:25,949 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 11:16:25,950 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
  | mpl.java:39)
  | 11:16:25,952 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
  | ccessorImpl.java:25)
  | 11:16:25,953 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,953 ERROR [STDERR] at 
org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegat
  | eWrapper.java:103)
  | 11:16:25,954 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMB
  | eanSupport.java:289)
  | 11:16:25,955 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Servi
  | ceMBeanSupport.java:245)
  | 11:16:25,956 ERROR [STDERR] at 
sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 11:16:25,956 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
  | ccessorImpl.java:25)
  | 11:16:25,967 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,968 ERROR [STDERR] at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp
  | atcher.java:155)
  | 11:16:25,969 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 11:16:25,970 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 11:16:25,980 ERROR [STDERR] at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvo
  | ker.java:264)
  | 11:16:25,981 ERROR [STDERR] at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:6
  | 59)
  | 11:16:25,986 ERROR [STDERR] at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceCon
  | troller.java:978)
  | 11:16:25,987 ERROR [STDERR] at $Proxy0.start(Unknown Source)
  | 11:16:25,988 ERROR [STDERR] at 
org.jboss.system.ServiceController.start(ServiceController.java:4
  | 17)
  | 11:16:25,988 ERROR [STDERR] at 
sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  | 11:16:25,989 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
  | ccessorImpl.java:25)
  | 11:16:25,989 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,990 ERROR [STDERR]

[jboss-user] [EJB 3.0] - Re: How do I invoke a method just after an ear-deploy?

2007-09-27 Thread oskar.carlstedt
Thank you all for quick replies. I tried the service annotoation as describen 
in the ejb tutorial. I think it must be the simplest way to go by simply adding 
the @Service-annotation.

Doing is will make the deployment to fail in JBoss 4.2.1.GA also having JBossWS 
2.0.1.GA installed. I get the following error:

  | 11:16:25,931 INFO  [EJBContainer] STARTED EJB: 
se.my.service.test.soapmessage.ServiceReg ejbName: ServiceReg
  | 11:16:25,944 ERROR [STDERR] java.lang.RuntimeException: Problem registering 
@Management interface for @Service class 
se.my.service.test.soapmessage.ServiceReg
  | 11:16:25,946 ERROR [STDERR] at 
org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:560)
  | 11:16:25,948 ERROR [STDERR] at 
org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:155)
  | 11:16:25,949 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 11:16:25,950 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 11:16:25,952 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 11:16:25,953 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,953 ERROR [STDERR] at 
org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
  | 11:16:25,954 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 11:16:25,955 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 11:16:25,956 ERROR [STDERR] at 
sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 11:16:25,956 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 11:16:25,967 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,968 ERROR [STDERR] at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 11:16:25,969 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 11:16:25,970 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 11:16:25,980 ERROR [STDERR] at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 11:16:25,981 ERROR [STDERR] at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 11:16:25,986 ERROR [STDERR] at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 11:16:25,987 ERROR [STDERR] at $Proxy0.start(Unknown Source)
  | 11:16:25,988 ERROR [STDERR] at 
org.jboss.system.ServiceController.start(ServiceController.java:417)
  | 11:16:25,988 ERROR [STDERR] at 
sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  | 11:16:25,989 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 11:16:25,989 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,990 ERROR [STDERR] at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 11:16:25,990 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 11:16:25,991 ERROR [STDERR] at 
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 11:16:25,991 ERROR [STDERR] at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 11:16:25,992 ERROR [STDERR] at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 11:16:25,992 ERROR [STDERR] at 
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 11:16:25,993 ERROR [STDERR] at $Proxy80.start(Unknown Source)
  | 11:16:25,993 ERROR [STDERR] at 
org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
  | 11:16:25,994 ERROR [STDERR] at 
org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:301)
  | 11:16:25,994 ERROR [STDERR] at 
org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:362)
  | 11:16:25,995 ERROR [STDERR] at 
org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
  | 11:16:25,995 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  | 11:16:25,996 ERROR [STDERR] at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  | 11:16:25,996 ERROR [STDERR] at 
sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  | 11:16:25,997 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 11:16:25,997 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:585)
  | 11:16:25,998 ERROR [STDERR] at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 11:16:25,999 ERR

[jboss-user] [EJB 3.0] - How do I invoke a method just after an ear-deploy?

2007-09-26 Thread oskar.carlstedt
Hello!

Does any of you out there know how to invoke an ejb3 method just after deploy 
of the ear file? (i.e. not the @PostConstruct, @PostActivate because these 
methods are called once per ejb instance).

There is a way to use an mbean and do something in the start method. But for me 
this is like using the big cannon for just a simple thing.


Best regards
/Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089058
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: JTA EntityManager cannot access a transactions

2007-09-19 Thread oskar.carlstedt
Hello!

I'm not sure , but if I look at your code you instantiate the em by yourself. 
Examples I've seen do not do that, they leave that part to JBoss, like the 
following code. Are you sure you get the correct entity manager?


  | 
  | @Stateless
  | @TransactionManagement(TransactionManagementType.BEAN) 
  | public class MySessionBean implements MyInterface {
  | 
  |@Resource
  |private EntityManager em;
  | 
  | }
  | 
  | 

Kind regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086326
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Sample application

2007-09-11 Thread oskar.carlstedt
Hello!

There are several examples in the JBossWS-distribution. Just download the 
normal distribution (src distribution is not required). The distribution zip 
file contains another zip file with lots of examples about how to do what in 
what situation.

Build the examples, deploy them into JBoss and you have something to test/look 
at. 

Kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083277
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How di I get detail in SOAPFault

2007-09-05 Thread oskar.carlstedt
... and I was expecting something like

  | http://schemas.xmlsoap.org/soap/envelope/";>
  |
  |
  |   
  |  http://schemas.xmlsoap.org/soap/envelope/";>codeNS:Server
  |  javax.xml.ws.soap.SOAPFaultException
  |  
  | http://my.service.com/common-ws/types";>
  |SC_BAD_REQUEST
  |This is a faked error
  | 
  |  
  |   
  |
  | 
  | 

Does anyone know how I shall write my code to get the detail part of the 
message to be serialized. Is it a bug?

//Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081484
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How di I get detail in SOAPFault

2007-09-04 Thread oskar.carlstedt
The response I get from JBoss is:

  | http://schemas.xmlsoap.org/soap/envelope/";>
  |
  |
  |   
  |  http://schemas.xmlsoap.org/soap/envelope/";>codeNS:Server
  |  javax.xml.ws.soap.SOAPFaultException
  |   
  |
  | 
  | 

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081047
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - How di I get detail in SOAPFault

2007-09-04 Thread oskar.carlstedt
Hello!

I can't get the detail element of the SOAPFault. Is there a magic way to do 
this. I have a Provider< SOAPMessage > implementation. When I do the following 
...

  | @Local
  | @Stateless
  | @WebServiceProvider(
  | serviceName = "MyService",
  | portName = "MyServiceSoap11Port",
  | targetNamespace = "http://my.service.com/something";,
  | wsdlLocation = "META-INF/wsdl/my-service.wsdl")
  | @ServiceMode(value = Service.Mode.MESSAGE)
  | public class MyServiceEndpointProvider implements Provider {
  | 
  |public SOAPMessage invoke(SOAPMessage requestSoapMessage) {
  |   ...
  | 
  |   SOAPFault theSOAPFault = SOAPFactory.newInstance().createFault();
  |   Detail soapFaultDetail = soapFault.addDetail();
  |   SOAPElement myFaultElement = soapFaultDetail.addChildElement(new 
QName("http://my.service.com/common-ws/types";, "myFault"));
  |   SOAPElement myCodeElement = myFaultElement.addChildElement(new 
QName("http://my.service.com/common-ws/types";, "code"));
  |   myCodeElement.setNodeValue("SC_BAD_REQUEST");
  |   SOAPElement myMessageElement = myFaultElement.addChildElement(new 
QName("http://my.service.com/common-ws/types";, "message"));
  |   myMessageElement.setNodeValue("This is a faked error");
  |   throw new SOAPFaultException(theSOAPFault)
  | 
  |   ...
  |}
  | }
  | 

... the detail part of the fault is missing, i.e. the serialized response does 
not contain my detail information, just the top fault element. Am I missing 
something obvious here or is it a bug. I'm using JBoss 4.2.1.GA with JBossWS 
2.0.1.GA. And yes, my wsdl points out a fault element specifying the detail 
above.

Thanks in advance
/Oskar
 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081045
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How to import relative schemas?

2007-08-31 Thread oskar.carlstedt
I posted i Jira issue about this 
[url]http://jira.jboss.org/jira/browse/JBWS-1798[url].

***

I deploy an ear file in JBoss5 that contains a war and a jar fil. The jar file 
contains a SLSB and the war file contains the web service (implemented as a 
Provider[SOAPMessage]). The war file has the following file structure in the 
the WEB-INF/wsdl folder:


  | WEB-INF/wsdl
  | my-service.wsdl
  | /imported
  | /my-service
  | /1.0-SNAPSHOT
  | my-service.xsd
  | /common
  | /1.0-SNAPSHOT
  | common.xsd
  | 
the wsdl file has a schema import like


the my-service.xsd imports the common.xsd file with the following import 
statement


Having this configuration will put JBoss into trouble. The error message sent 
is telling med that parent paths are not allowed, and pointing out to use 
getParent() instead. So I setting the schemaLocation attribute to 
getParent()/getParent()/ will point out another path, but it is completely 
wrong.


***

Best
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080051
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How to import relative schemas?

2007-08-29 Thread oskar.carlstedt
Some more info...

The schemas I'm using are including other schemas too, that are also referenced 
by a relative schema location. So it's is i kind of nested schema imports in 
several schemas. All schemas are not directly located under WEB-INF/wsdl, 
instead they are located under their resp. http-path on another schema-server, 
e.g. WEB-INF/wsdl/a/a.xsd, WEB-INF/wsdl/b/b.xsd

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079035
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - How to import relative schemas?

2007-08-29 Thread oskar.carlstedt
Hi All!

I cannot not manage to create a deployment in Boss-5.0.0.Beta2
 where I import schemas by relative paths. Using "../"-paths are not allowed 
(getting an exception telling me that parent paths are not allowed). Parent 
paths are allowed in JBossWS 1.2.1.GA on JBoss 4.0.5.GA.

What I'm actually doing is that I create my wsdl and schema files by hand, i.e. 
contract first development. Then I create an endpoint provider to handle 
incoming requests.

In the endpoint I set the wsdl location to WEB-INF/wsdl/... This is working, 
JBoss finds my wsdl file but cannot resolve schema the relative path of 
imported schemas.

Does anyone know how to solve this problem?


Thanks
Oskar
 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079033
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: need help for Transaction Attribute Types

2007-08-14 Thread oskar.carlstedt
Hi All!

I haven't read everything in this thread but a good idea might be to take a 
look in the Java EE tutorial. It has a whole chapter discussing transactions.

Whole tutorial: http://java.sun.com/javaee/5/docs/tutorial/doc/
Transactions: 
http://java.sun.com/javaee/5/docs/tutorial/doc/Transaction.html#wp79663


Kind regards
/Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073936
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can a Stateless bean make a call to an entity bean to pe

2007-06-28 Thread oskar.carlstedt
Hi again!

Good news! Take a look at this post on another forum 
http://forums.oracle.com/forums/thread.jspa?threadID=244914

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058577
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can a Stateless bean make a call to an entity bean to pe

2007-06-28 Thread oskar.carlstedt
Hello again!

If your datasource is correctly deployed, then I don't know. It might be a 
TopLink issue. This is the way to deploy a EJB3 jar file and connect it to a 
datasource.

When using EJB3 and JPA you are not using Hibernate directly. You are using 
JPA, which JBoss in turn maps to Hibernate. You don't have to care about the 
implementation of JPA. JBoss choose Hibernate, Glassfish choose TopLink, but 
they are all doing the same thing. The whole idéa is that you don't have to 
care about the underlying mechanism/implementation.

So, if you are using pure JPA, then you should go for the standard behaviour of 
the apllication server's implementation. On the other hand, if you are using 
special features of for example TopLink, or if you aren't satisfied with the 
standard implementation (in this case Hibernate), then of course you should go 
for TopLink if you find TopLink solve your problems.


Kind regards
Oskar


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

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

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can a Stateless bean make a call to an entity bean to pe

2007-06-27 Thread oskar.carlstedt
Hi!

The datasource file has its own deployment, so this file shall be put directly 
in the deploy folder. When doing this you'll see JBoss deploying the ds file. 
After the deloyment (takes a second or two) you can find the deployed 
datasource in the jmx-console (http://localhost:8080/jmx-console).

In the jmx-console you shall be able to find a local transaction source, a 
connection pool etc. All these are are named from jndi-name in your ds.xml-file.

The persitence.xml file shall be bundled in the classpath of the jar file 
containing your ejbs.

The error you get must, as far as I can see, be due to an incorrect deployment 
of the ds-file. What if you only deploy the ds-file? Do get any errors? Can you 
see the deployed datasource in the jmx console?

Best
//Oskar




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058103
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can a Stateless bean make a call to an entity bean to pe

2007-06-27 Thread oskar.carlstedt
Sorry, now thing got messed up here. We take the examples once again. Look at 
the JNDI-names. These got messed in the previous post.

//Oskar

persistence.xml

  | http://java.sun.com/xml/ns/persistence";
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  | xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
  |  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
  | version="1.0">
  | 
  | 
  | 
  | java:/my-service-DS
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

my-service-ds.xml

  | 
  | 
  | 
  | 
  | 
  | my-service-DS
  | 
  | 
  | 
  | jdbc:${jdbc.vendor}://${db.host}:${db.port}/${db.name}
  | 
  | ${db.username}
  | ${db.password}
  | ${jdbc.driverclass}
  | 
  | 
  | 0
  | 5
  | 
  | 
  | 1
  | 
  | 
  | 
  | 
org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
  | 
  | 
  | 
  | 
  | org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
  | 
  | 
  | 
  | 
  | 
  | mySQL
  | 
  | 
  | 
  | 
  | 


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058015
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Can a Stateless bean make a call to an entity bean to pe

2007-06-27 Thread oskar.carlstedt
Hi!

It seems like JBoss can't find your datasource. It also looks like you are 
using toplink, are you? The example bellow is for the normal JBoss EJB3 (on top 
of Hibernate). Anyway, the configuration shall still be the same (please 
correct me if I'm wrong) except some of the properties in persistence.xml.

So, you shall have a persistence.xml file packed with your ejb-jar-file. The 
file looks something like (the example is using MySQL-dialect. You shall 
probably use the Oracle dialect):

  | http://java.sun.com/xml/ns/persistence";
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  | xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
  |  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
  | version="1.0">
  | 
  | 
  | 
  | java:/service-fundorder-DS
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

Then you must deploy a data-source-file that defines the connection to the 
database. The filename must end with -ds.xml, e.g. my-service.ds.xml This file 
looks something like (also MySQL). THere are plenty of such example files in 
the JBoss distro under docs/examples/jta:

  | 
  | 
  | 
  | 
  | 
  | my-service-DS
  | 
  | 
  | 
  | jdbc:${jdbc.vendor}://${db.host}:${db.port}/${db.name}
  | 
  | ${db.username}
  | ${db.password}
  | ${jdbc.driverclass}
  | 
  | 
  | 0
  | 5
  | 
  | 
  | 1
  | 
  | 
  | 
  | 
org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
  | 
  | 
  | 
  | 
  | org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
  | 
  | 
  | 
  | 
  | 
  | mySQL
  | 
  | 
  | 
  | 

Kind regards
//Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058012
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: change HTTP status code in a WS fault

2007-06-20 Thread oskar.carlstedt
Hi All!

I'm not sure if this works, but an idéa might be to implement a simple servlet 
filter that you put in front of the servlet. The filter will then invoke the 
http request, check the response code and change it if necessary.

A normal servlet has a filter chain, and I think you can configure one in 
web.xml for this kind of servlet too.

Best regards
Oskar

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

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

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - War inside ear, where to place taglib jars?

2007-06-04 Thread oskar.carlstedt
Hi all!

I've been struggling a lot with a problem I didn't expect do face at all. What 
I try to do is to create a web application using Servlet 2.4, JSTL and Spring. 
This is OK in Tomcat. But creating an ear file and place all dependent jar in 
the ear instead of the war will make JBoss (read Tomcat) to crash and tell me 
that it cannot find the JSTL code in any jar. But all necessary jars are in the 
ear, the jboss-app.xml defines a new repository loader. It works because Spring 
finds and loads the spring beans xml file. Everyting seems to be alright, 
except when running JSPs containing taglib references. Tomcat says it cannot 
find implementing taglib.

The solution I found was to put all taglib jars in the war's WEB-INF/lib 
folder. But shall it be this way? What if I want to use Spring, JSTL etc. in 
other war/jar files. In such case, do I have to duplicate these jars?

I would be very glad if someone can help me find a solution where Tomcat can 
find all jars inside the ear, even those containing taglib implementations.

With kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051120
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: javax.xml.rpc.JAXRPCException: Cannot obtain operation m

2007-06-04 Thread oskar.carlstedt
Hi!

I read another thread on this forum having the same problem. It sounds that the 
SOAPAction http header is not set. Can you try to invoke the service by using 
SoapUI http://www.soapui.org, or enable the RequestDumperValve in tomcat's 
service.xml 
($JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml). Doing so 
you can see all the sent request parameters, headers etc.

Kind regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050899
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: wstools error from WSDL to Java

2007-05-21 Thread oskar.carlstedt
Hello!!

You shall use forward slashes instead of the backslash in the windows path, 
i.e. change C:\test\HEBService_Full_.wsdl to C:/test/HEBService_Full_.wsdl

Kind Regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047442
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: creating new targetnamespace for complex types

2007-05-15 Thread oskar.carlstedt
Hi!

I think this sounds terrible for you, but you probably have to start working in 
the other direction. If you want to ensure your contract (the wsdl file) is 
changed in the way you want, then you must start with taking control over it, 
i.e. develop it by yourself. What I'm saying - take full control of your wsdl 
and its dependent schema instances.

Beeing in your situation, it might be good saving the old wsdl file and then 
run a wsprovide. Your wsdl will be the same but you have to update your 
implementation.

With kind regards
Oskar




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045673
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: EJB3 and jndi error.

2007-05-10 Thread oskar.carlstedt
Hi!

Take a look in the jmx console/jndi view to see under what name you ejb is 
bound. For me it looks like you forgot a slash right after the "java:".

With kind regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044591
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: how to deal with unicode

2007-05-09 Thread oskar.carlstedt
Hi!

It looks like you have a space between the - and D character in 
-Dfile.encoding...

//Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044366
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: what´s the er ror

2007-05-07 Thread oskar.carlstedt
Good work!

Sometimes it is hard for JBoss to find a good error message. When you specify 
the column annotation, JBoss tries to save/serialize the object into that 
column, no matter of what type it is. So in this case, JBoss finds the 
UsuarioEJB and then i tries to save it into the column idUsuario - and here is 
the place where everything goes wrong. How can Jboss serialize UsuarioEJB into 
the specified column, it doesn't have a type for it, ...

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043611
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: what´s the er ror

2007-05-07 Thread oskar.carlstedt
Are you sure you want to use Double as you id type. Normally databases are 
using integers for ids. Try to use Long ,or Integer if you can gurarantee that 
you won't exceed the max int value, instead?

With kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043580
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Joined Subclass Inheritance Strategy Problem

2007-05-06 Thread oskar.carlstedt
Hello!!

I'm not sure if this is what you are asking for. Take a look at the following 
post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=83732. It might 
handle what you are looking for, but in a persistent way instead of querying.

With kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043570
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - @EmbeddedId vs. @IdClass - when shall I use what?

2007-05-04 Thread oskar.carlstedt
Hi all!

Can anyone explain the difference between the two annotations @IdClass/@Id and 
@Embeddable/@EmbeddableId. When shall I use @IdClass and when shall I use 
@EmbeddedId?

Does anyone of you have a good answer to this? I would really appreciate your 
help to make me understand what decision to take in different situations.

Best Regards
/Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043246
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: HQL/ JPA-QL Query Tuning: How to enforce the join order

2007-05-04 Thread oskar.carlstedt
anonymous wrote : This is just sick disgusting rubbish! Who ever invented that 
stuff - fire him! 
  | 

No, sorry, this is not "sick disgusting rubbish". As a matter of fact, the join 
order is of importance for many databases. One can think that a databse's 
execution planner should fix this, but some of them aren't.

Ok, why is the order of importance. When joining the same table with different 
other tables one get subsets of data that in turn will be joined again etc.

In this example whe have T1, T2 and T3. Let say a join between T1 and T2 gives 
1.000.000 records in return and a join between T1 and T3 gives 1000 records in 
returns. Of course it is better to do the T1 and T3 join before and the make a 
join between result of (T1, T3) and T2. It will speed up a lot because you are 
cutting off most of the records in the first join.

With kind regards
Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043081
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: ejb-jar.xml a clear definition for EJB3

2007-05-03 Thread oskar.carlstedt
Oooppss..

One more thing I forgot. If you don't provide the ejb-jar.xml file, JBoss will 
deploy your ejbs as:

//Local or
//Remote.

In the example above you will get something like:
/my-service/MyBean/Local or /my-service/MyBean/

Sorry for using the word "service" here. I did'd som web services and called 
them ...-service. That's why the service extension of the ear file's name.

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042769
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: ejb-jar.xml a clear definition for EJB3

2007-05-03 Thread oskar.carlstedt
Hello!

No, in general you don't need the ejb-jar.xml. You can include the ejb-jar.xml 
file if you intend to override settings from given annotations. But in generel, 
you don't need it.

What you need to do is:
Create a JAR-file with the ejb:s you want to deploy. This file must also 
include a META-INF/persistence.xml file where you ponit out the datasource you 
wan't to use. Here is an example:

  | http://java.sun.com/xml/ns/persistence";
  |xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
  |  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
  |version="1.0">
  |
  |   
  |  java:/my-ejbs-DS
  |   
  |   
  |  
  |  
  |  
  |   
  |
  | 
  | 

The structure of the final jar file containing the ejb:s is something like:

  | /my-ejbs.jar
  |/META-INF
  |   MANIFEST.MF
  |   persistence.xml
  |/my
  |   /example
  |  /bean
  | MyBean.class
  | ...
  | 

Then  you need to create an ear-file. This is not a must, but you get better 
structure if you deploy your ejbs in an ear file. You still need to specify the 
META-INF/application.xml file.  Here is an example:

  | 
  | http://java.sun.com/xml/ns/j2ee";
  |xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd";
  |version="1.4">
  |my application description
  |my-application
  |
  |
  |
  |   my-ejbs.jar
  |
  | 
  |
  |
  |   
  |  my-service-jaxws-web.war
  |  /my-service-jaxws-web
  |   
  |
  | 
  | 

A good idea is also to bundle the dependent jar files in the ear file. Place 
them in the lib folder of the ear file. In the META-INF folder you create a 
jboss-app.xml file where you tell jboss to use the libs you provide in the ear 
file. Note that if you do this way and also include a war file in the ear - 
then make sure you don't have any WEB-INF/libs/... in the war file. Here is an 
example:

  | http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd";>
  | 
  |my-ejbs:app=ejb3
  | 
  | 

So finally, this is the structure of the ear file:

  | my-service.ear
  |/my-ejbs.jar
  |/lib
  |   dependency_jar_A.jar
  |   dependency_jar_B.jar
  |   ...
  |/META-INF
  |   MANIFEST.MF
  |   application.xml
  |   jboss-app.xml
  | 


Kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042766
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Question: How does JBossWS find the business method to invok

2007-04-26 Thread oskar.carlstedt
Hello!!

This may be a stupid question. Looking into the source may answer this, but I 
think it is better asking you for a better answer.

After looking at several WSDL files generated by JBossWS (also the samples in 
the JBossWS distro) where document/literal is used but no soap action is 
specified for each operation.

If I'm not using WS Addressing, how can JBossWS understand what business method 
to invoke? Is it decided by the request type?

Kind Regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040986
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: jboss4.0.5 + which version of jbossws + correct document

2007-04-25 Thread oskar.carlstedt
Hello!!

You shall use the latest JBossWS documentation if you are using JBossWS. You 
can find it here http://jbws.dyndns.org/mediawiki/index.php/Main_Page

Regards
Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040547
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-23 Thread oskar.carlstedt
Ok, I nunderstand. Some questions:

Do you have a constant flow of messages? Do you need synchronus responses? If 
not, it might be possible for you to que these requests?

Is is a requirement to have the data published in the database right after you 
have returned a response?

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039883
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Problem with composite Primary key which is also a forei

2007-04-23 Thread oskar.carlstedt
Hi!

The @Id annotation will annotate the primary key of your class. The parent id 
is not the primary key of your class, it is a foreign key, but an @Id in the 
parent class. Remove @Id from the parentId.

If you want to use composite keys, take a look here 
http://docs.jboss.org/ejb3/app-server/tutorial/composite/composite.html


Kind Regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039873
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-23 Thread oskar.carlstedt
Hi All!

The intention of my last post was to explain why sequences, indexes etc. make 
the solution less performant.

I still agree with Felix. Huge bulk operations shall be done by using the tools 
provided by the database, in this case a stroed procedure.

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039852
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-23 Thread oskar.carlstedt
Ok!!

Having indexes will slow down an insert statement. Why? The database has to 
write an extra entry into an index for each insert. Depending on indexed 
column, this may also slow down update statements.

Using transacttions is even worse. The database must write into a transaction 
log to be able to do a rollback if necessary.

Using sequences instead of an id generated by Java. Yes, a little bit of 
course. For each insert statement, Hibernate must query the database for the 
next sequence number, or hibernate must update the Java object with the new 
sequence number set by the database using an sql query.

In general all SQL databases are slow when it comes to disk io, i.e. taking 
care of the data. The data files are normally not optimized for either reading 
and/or writing. A relation database will force the disk to move the read head, 
which is a physical movement, serveral times on the disk for each data 
read/write operation. Indexes are normally read into memory, but the data has 
to be read/written. This is why realtion database are fast in finding items (in 
memory index lookup) but relatively slow when it comes to fetching/writing data.

Regards
Oskar




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039823
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-20 Thread oskar.carlstedt
Hi again!

What I actually mean is that normally it is better to have a few really fast 
computers instead of a single powerful machine. And I understand your 
situation, you have this machine and you wan't to use it.

Do you know if there are other IO-intensive tasks running on that machine at 
the same time? Normally you just don't buy such a server to insert 1 
rows/sec in an oracle database. Are you "alone" on your server?

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039324
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: setProperty must be overridden by all subclasses of SOAP

2007-04-20 Thread oskar.carlstedt
Check the manual chapter 2.2.2.4 
http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch2.chapter.html#d0e2648

Regards
Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039275
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-20 Thread oskar.carlstedt
Hi again!

Here is some information from a project I attended a couple of years ago. We 
operated on a Sun Starfire (Sun Enterprise 1), totally 32 cpus and 32GB 
RAM, our domain had 12 cpus and 12 GB RAM. A lot has hapend since then, but 
still, such computers are not fast when it comes to simple things like database 
inserts. They are used for extreme load and may calulate a lot of complex stuff.

We hade Oracle on the starfire. On another server we had a Java program doing 
import stuff to the database.

In our case, on the Starfire, the application perfomed much better when using 
5-10 threads than using 20 or 30 of them. (I've read about other persons 
complaining about how Java 1.4.x scales on multi cpu machines). Note that we 
used Java 1.4.x here. I don't know about how Java 1.5 or Java 1.6 behave on 
multi cpu machines. 

When we changed the environment to a normal Compaq D180 server (the pizza box) 
with only 2 Intel Xeon, 1GB RAM having better clock frequency, we got much 
better performance. I can't remember exactly how much better, but I know we are 
talking about several 100 percents. We had Java on one server and Oracle on 
antoher server (also a pizza box, but 4GB RAM). These machines used Windows 
2000 Server Std. Edition.

Then we tried to seutp Oracle on a 8 Xeon cpu Dell server 8GB RAM, with Windows 
2000 Server Ent. Ed (you had to have ent. ed. to be able to use all processors 
and all memory). This machine had lower processor speed than the piza box. This 
configuration gave us worse performance compared to the 2 pizza boxes.

On all machines we were in contact with Oracle about how to setup the Oracle to 
get the best performance. One thing Otracle learned me, but this was version 
8.1.6, was to setup the chunk size of the disks. When you raid your disks, you 
shall have as specific chunk size. At least on windows. You shall also have a 
special raid configuration. From the beginning we had raid 10, but as I can 
remember you shall use something else.

Best insert performance:
1. import of flat file
2. creating a stored procedure wher you sent a kind of comma separated string.
3. Java - Oracle simple sql prepared statements
4. Java - using simple statements.
...

What about the network between database and java. Are they running on separate 
machines. If not you will have a slower system.

Finally, Yes, the OCI drivers are much faster. Ther are communicating directly 
with the Oracle DB. The non OCI drivers are normally working with the PL/SQL in 
Oracle - an extra layer on top of the database.

Regards
Oskar


PS...
>From Java, rember to turn off auto commit. Ds.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039259
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-20 Thread oskar.carlstedt
It is possible to configure hibernate to do bulk operation. Perhaps you've 
already tried it? If not, take a look a 
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#queryhql-bulk

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039139
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-19 Thread oskar.carlstedt
...

one more thing. Whater decision you make here. Make sure you are using the 
native Oracle driver.

//Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039023
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: 10,000 Recorc Per Second (In EJB 3.0)

2007-04-19 Thread oskar.carlstedt
Hi!!

Using EJBs here is probably not the best way to go. Doing so will cause the 
container to create a lot of insert statements - too many to get the 
performance you want. If I'm wrong here, let me know.

I did something like this a couple of years ago with Oracle 8.1.6. If you don't 
care about all transactions a good way might be to create a data file (normally 
a comma seprataed flat file), which you later do an import on. Here you get 
performance, but if it is an good design. I don't think so. Good design and 
performance are often something that is hard to combine.

Another way is to create a stored procedure that you call when you have, let 
say 5000 records to insert.

One thing to think of is the data transport. Using Oracle from Java you go from 
client(s) to a java server, to PL/SQL to Oracle DB.

Kind Regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039021
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How to provide soapAction from dispatch call?

2007-04-18 Thread oskar.carlstedt
I file this as a bug in JIRA http://jira.jboss.com/jira/browse/JBWS-1611. There 
is no SOAPAction http header sent to the server doing the specified way.

//Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038332
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: How to provide soapAction from dispatch call?

2007-04-17 Thread oskar.carlstedt
Does anyone know if this is a bug or related to something else. Or how do I get 
around this problem? I found this thread on  java.net forum 
http://forums.java.net/jive/message.jspa?messageID=190079. Doesn't help much 
but it seem to be a problem in jwsdp2.

Regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037940
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Element or attribute do not match QName production: QNam

2007-04-16 Thread oskar.carlstedt
It seems like using a StreamSource instead of the DOMSource will work to get 
around this problem. But I can't understand why.

//Oskar

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037614
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - How to provide soapAction from dispatch call?

2007-04-16 Thread oskar.carlstedt
Hello!

I've tried a to fix this for some hours know. Maybe I'm doing something 
completely wrong here.

I have a web service client that that is using the dispatch technique. I will 
use the dispatch because I'm using xmlbeans to bind my data. Here is a little 
code snippet of what I'm trying to do:


  | // names
  | String targetNamespace = "http://test/test-service";;
  | QName serviceQName = new QName(targetNamespace, "TestService");
  | QName portQName = new QName(targetNamespace, "TestServiceSoap11Port");
  | URL wsdlURL = new 
URL("http://lpt-osca:8080/service-testservice-jaxws-web?wsdl";);
  | 
  | // create service
  | Service service = Service.create(serviceQName);
  | service.addPort(portQName, SOAPBinding.SOAP11HTTP_BINDING, 
wsdlURL.toExternalForm());
  | Dispatch dispatch = service.createDispatch(portQName, 
StreamSource.class, Mode.PAYLOAD);
  | 
  | // set SOAPAction
  | dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, 
true);
  | dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, 
"uri:placeBuyOrder");
  | 
  | // create xml options for pretty print
  | XmlOptions xmlOptions = new XmlOptions();
  | xmlOptions.setSavePrettyPrint();
  | 
  | // create request
  | TestRequestDocument testRequestDocument = 
TestRequestDocument.Factory.newInstance();
  | ...
  | 
  | 
  | // print request
  | System.out.println("REQUEST");
  | testRequestDocument.save(System.out, xmlOptions);
  | System.out.println();
  | 
  | // save request in a stream
  | ByteArrayOutputStream requestByteArrayOutputStream = new 
ByteArrayOutputStream();
  | testRequestDocument.save(requestByteArrayOutputStream);
  | 
  | // create a new stream source
  | StreamSource requestStreamSource = new StreamSource(new 
ByteArrayInputStream(requestByteArrayOutputStream.toByteArray()));
  | 
  | // invoke
  | StreamSource responseSource = dispatch.invoke(requestStreamSource);
  | 
  | // parse result
  | XmlObject xmlObject = 
XmlObject.Factory.parse(responseSource.getInputStream());
  | 
  | // print response
  | System.out.println("RESPONSE");
  | xmlObject.save(System.out, xmlOptions);
  | 

When doing this. it seems like the soap action attribute is not sent to the 
server, at least not in the http headers. So, my question is: Is the soapAction 
sent to the sever? If so, where can I find it in the messageContext?

My service is a web service endpoint provider implementation like

  | @Stateless
  | @WebServiceProvider(
  | serviceName = "TestService",
  | portName = "TestServiceSoap11Port",
  | targetNamespace = "http://test/test-service";,
  | wsdlLocation = "WEB-INF/wsdl/test-service.wsdl")
  | @ServiceMode(value = Service.Mode.PAYLOAD)
  | public class FundOrderEndpointProvider implements Provider {
  | 
  | ...
  | 
  | }
  | 
  | 

I will look for the soap action http header to decide what method to invoke in 
another stateless session bean.

Can anyone help me we this?
Best Regards
Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037613
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: Element or attribute do not match QName production: QNam

2007-04-16 Thread oskar.carlstedt
... one more thing ...

I'm running JBoss in isolated mode. All xmlbeans jar file are bundled in the 
EAR file.

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037474
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Element or attribute do not match QName production: QName::=

2007-04-16 Thread oskar.carlstedt
Hello!!

I'm getting a strange exception when invoking a simple client inside a 
stateless session bean. Everything has to do with the 
javax.xml.namespace.QName. I'm using xml beans which I had to modify because of 
an extra include of the javax.xml.namespace.QName, i.e. I have removed the 
javax.xml.namespace from the xbean.jar. 

I have the following code:

  | XmlOptions xmlOptions = new XmlOptions();
  | xmlOptions.setSavePrettyPrint();
  | 
  | // create target namespace
  | String targetNamespace = "http://test/test-service";;
  | 
  | QName serviceQName = new QName(targetNamespace, "Test");
  | QName portTypeQname = new QName(targetNamespace, "TestSoap11Port");
  | URL wsdlURL = new URL("http://lpt-osca:8080/service-test-jaxws-web?wsdl";);
  | 
  | Service service = Service.create(wsdlURL, serviceQName);
  | Dispatch dispatch = service.createDispatch(portTypeQname, 
DOMSource.class, Mode.PAYLOAD);
  | 
  | // creating xml beans request ...
  | TestRequestDocument testRequestDocument = 
TestRequestDocument.Factory.newInstance();
  | ...
  | 
  | System.out.println("REQUEST");
  | testRequestDocument.save(System.out, xmlOptions);
  | System.out.println();
  | 
  | DOMSource requestSource = new DOMSource(testRequestDocument.newDomNode());
  | DOMSource responseSource = dispatch.invoke(requestSource);
  | XmlObject xmlObject = XmlObject.Factory.parse(responseSource.getNode());
  | 
  | System.out.println("RESPONSE");
  | xmlObject.save(System.out, xmlOptions);
  | 
  | 

And I'm getting the following error:

  | 2007-04-16 10:31:51,636 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] 
createMessage: [contentType=text/xml; charset=UTF-8]
  | 2007-04-16 10:31:51,665 ERROR [STDERR] [Fatal Error] :1:331: Element or 
attribute do not match QName production: QName::=(NCName':')?NCName. 
  | 2007-04-16 10:31:51,691 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] 
Configure SOAPBinding
  | 2007-04-16 10:31:51,691 ERROR 
[org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
  | java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do 
not match QName production: QName::=(NCName':')?NCName. 
  | at org.jboss.ws.core.utils.DOMUtils.parse(DOMUtils.java:125)
  | at 
org.jboss.ws.core.soap.EnvelopeBuilderPayload.build(EnvelopeBuilderPayload.java:56)
  | at 
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:253)
  | at 
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171)
  | at 
org.jboss.ws.core.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:185)
  | at 
org.jboss.ws.core.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:440)
  | at 
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  | at 
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | at 
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | at java.lang.Thread.run(Thread.java:595)
  | 


Can anyone explain this to me. I found the same error 

[jboss-user] [EJB 3.0] - Re: NOT NULL columns with a DEFAULT

2007-04-13 Thread oskar.carlstedt
Hi!!

Dtabase columns that are not part of the used implementation (not mapped by 
properties in the class) are not exposed in the SQL statement to the database - 
which is exactly what I want (the database shall set this value, not the sql 
statement).

Regards
Oskar
 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036976
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: NOT NULL columns with a DEFAULT

2007-04-12 Thread oskar.carlstedt
Hi!!

No It is not exactly what I want. I solved everything by using inheritance and 
the SINGE_TABLE inheritance method. Then I could skip my property I didn't want 
to include.

But originally, I have a database specifying the default value. This value is 
used by other applications too. So to centralize the default value, we declared 
it in the database - Therefore, I don't want to set the default value in my 
implementation. Maybe this is something to report as a new annotation for ejb3. 
I don't think I'm the only one that is modeling a persistence layer on an 
existing database.

Anyway, I resolved my problem by using inheritance.

  | @Entity
  | @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  | @DiscriminatorColumn(name = "discriminator", discriminatorType = 
DiscriminatorType.STRING)
  | @Table(name = "THE_TABLE")
  | public class GenericEntityBean implements Serializable {
  | 
  | @Id
  | @Column(name = "id")
  | @GeneratedValue(strategy = GenerationType.IDENTITY)
  | protected Integer id;
  | 
  | @Column(name = "COMMON_VALUE")
  | protected String commonValue;
  | 
  | ...
  | }
  | 
  | 
  | @Entity
  | @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
  | @DiscriminatorColumn(name = "discriminator")
  | @DiscriminatorValue(name = "SPECIFIC")
  | public class SpecificEntityBean extends GenericEntityBean implements 
Serializable {
  | 
  | 
  | @Column(name = "ANOTHER_SPECIFIC_VALUE")
  | protected String anotherSpecificValue;
  | 
  | ...
  | }
  | 
  | 

Best Regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036770
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: SOAP Message with Body of any type

2007-04-12 Thread oskar.carlstedt
Hello!!

I'm not sure if I understand you right here. Take a look at writing you own 
endpoint provider 
http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#Endpoint_Provider. 
It may help you.

Best
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036759
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: NOT NULL columns with a DEFAULT

2007-04-12 Thread oskar.carlstedt
I have the same problem. Did you find any answer/solution for this?

Kind regards
Oskar


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036640
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-03 Thread oskar.carlstedt
Hi!!

I'm not sure about this. But I think I've read that you cannot specify booth 
name and referenceColumn when using the JoinColumn annotation.

Try to just use the name attribute.

//Oskar



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034042
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Etity reference problems

2007-04-03 Thread oskar.carlstedt
Thank you for helping me!

I found the error I did. In my code where I assigned all objects I missed to 
add the B item to the list of B:s in A. Doing this resolved my problem. The 
following steps must be applied:

1. Create A
2. Create all B:s and add them to A
3. Create C by using A and the expected B

I missed to add the B, that was mapped from A and C, to A. Kind of stupidness 
from  my side. I put my working code here for all of you who are interested in 
this:


  | @Entity
  | @Table(name = "A")
  | public class A implements Serializable {
  | 
  | @Id
  | @GeneratedValue(strategy = GenerationType.IDENTITY)
  | @Column(name = "Aid")
  | private Integer id;
  | 
  | @OneToOne(cascade = CascadeType.ALL, mappedBy = "a", fetch = 
FetchType.EAGER)
  | private C c;
  | 
  | @OneToMany(cascade = CascadeType.ALL, mappedBy = "a", fetch = 
FetchType.EAGER)
  | private List bs = new ArrayList();
  | 
  | ...
  | 
  | protected A() {};
  | 
  | public A(...) {
  | ...
  | }
  | 
  | public List getBs() {
  | return bs;
  | }
  | 
  | public void setBs(List bs) {
  | this.bs = bs;
  | }
  | 
  | public void addB(B b) {
  | 
  | b.setA(this);
  | this.bs.add(b);
  | }
  | 
  | public C getC() {
  | return c;
  | }
  | 
  | public void setC(C c) {
  | c.setA(this);
  | this.c = c;
  | }
  | 
  | ...
  | }
  | 
  | 
  | 
  | @Entity
  | @Table(name = "B")
  | public class B implements Serializable {
  | 
  | @Id
  | @GeneratedValue(strategy = GenerationType.IDENTITY)
  | @Column(name = "Bid")
  | private Integer id;
  | 
  | @ManyToOne
  | @JoinColumn(name = "Aid", nullable = false)
  | private A a;
  | 
  | ...
  | 
  | protected B() {};
  | 
  | public B(A a, ...) {
  | 
  | this.a = a;
  | ...
  | }
  | 
  | public Integer getId() {
  | return id;
  | }
  | 
  | public void setId(Integer id) {
  | this.id = id;
  | }
  | 
  | public A getA() {
  | return a;
  | }
  | 
  | public void setA(A a) {
  | this.a = a;
  | }
  | 
  | ...
  | }
  | 
  | 
  | 
  | @Entity
  | @Table(name = "C")
  | public class C implements Serializable {
  | 
  | @Id
  | @GeneratedValue(strategy = GenerationType.IDENTITY)
  | @Column(name = "Cid")
  | private Integer id;
  | 
  | @OneToOne
  | @JoinColumn(name = "Aid", nullable = false)
  | private A a;
  | 
  | @OneToOne
  | @JoinColumn(name = "Bid", nullable = false)
  | private B b;
  | 
  | 
  | protected C() {};
  | 
  | public C(A a,
  | B b) {
  | 
  | this.a = a;
  | this.b = b;
  | }
  | 
  | public Integer getId() {
  | return id;
  | }
  | 
  | public void setId(Integer id) {
  | this.id = id;
  | }
  | 
  | public A getA() {
  | return a;
  | }
  | 
  | public void setA(A a) {
  | this.a = a;
  | }
  | 
  | public B getB() {
  | return b;
  | }
  | 
  | public void setB(B b) {
  | this.b = b;
  | }
  | }
  | 
  | 



Finally some points:
- There is an error in my first post. "... mappedBy="A"..." shall be "... 
mappedBy="a"...". My mistake in the post.

- This fix requires the C table to carry its own primary key, a Cid.

- As you say Felix, it doesn't look good to point out Aid twice. This shall 
work, but it seems to be a bug in hibernate (see 
http://forum.hibernate.org/viewtopic.php?t=970823). JBoss 4.0.5.GA is using 
Hibernate 3.2, it shall be fixed in Hibernate 3.3.0. I haven't tried the join 
table, I will check it out and se what more it gives to me. It might be a kind 
of shortcut for my C table mapping.

Thanks again for quick response.

Best
Oskar


 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033902
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


  1   2   >