[jboss-user] [Beginner's Corner] - Re: Getting Up & Running with MySQL, DataNucleus & JDO
El Noobie
do-not-reply at jboss.com
Fri Aug 2 15:23:24 EDT 2013
El Noobie [https://community.jboss.org/people/elnoobie] created the discussion
"Re: Getting Up & Running with MySQL, DataNucleus & JDO"
To view the discussion, visit: https://community.jboss.org/message/831214#831214
--------------------------------------------------------------
Already got it!
Silly error on my part. :8}
@Path ("/dstest")
public class DataSourceService {
@Context
HttpServletRequest request;
@GET
@Produces({MediaType.APPLICATION_XML})
public DSTestDocument getDataSourceTestResults() {
try {
// Obtain our environment naming context
InitialContext initCtx = new InitialContext();
// Look up our data source
Object lol = initCtx.lookup("java:/datasources/testMeDS");
} catch (Exception e) {
e.printStackTrace(System.err);
}
// build the document
// ...
// do some logging
// ...
return theResopnseDocumentObject;
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/831214#831214]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130802/80d44aa3/attachment-0001.html
More information about the jboss-user
mailing list